<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged selenium</title>
<link>https://coderlegion.com/tag/selenium</link>
<description>Powered by Question2Answer</description>
<item>
<title>Best Selenium Alternatives in 2026: Top Testing Tools to Replace Selenium</title>
<link>https://coderlegion.com/23120/best-selenium-alternatives-in-2026-top-testing-tools-to-replace-selenium</link>
<description>&lt;p&gt;Selenium has been a major part of test automation for more than two decades. It helped shape how teams approached browser testing and became the default framework for UI automation.&lt;/p&gt;
&lt;p&gt;But in 2026, software development moves much faster than it did when Selenium became popular.&lt;/p&gt;
&lt;p&gt;Teams ship weekly. Interfaces change often. QA is no longer limited to automation engineers.&lt;/p&gt;
&lt;p&gt;That is where Selenium starts to show its age.&lt;/p&gt;
&lt;p&gt;It is not that Selenium is outdated. It is that modern teams need faster, simpler, and easier ways to build and maintain test automation.&lt;/p&gt;
&lt;p&gt;If you are looking for a better alternative, this guide covers the best Selenium alternatives in 2026, what they do best, and which teams they fit.&lt;/p&gt;
&lt;h3 id=&quot;why-teams-are-replacing-selenium&quot;&gt;Why Teams Are Replacing Selenium&lt;/h3&gt;
&lt;p&gt;Selenium still powers thousands of automation frameworks, but it comes with challenges that are harder to justify today.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;High maintenance&lt;/strong&gt;&lt;br&gt;
Selenium relies heavily on locators like XPath and CSS selectors. Small UI updates often break tests.&lt;/p&gt;
&lt;p&gt;That means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Frequent debugging&lt;/li&gt;
&lt;li&gt;Constant test maintenance&lt;/li&gt;
&lt;li&gt;Slower releases&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Flaky test execution&lt;/strong&gt;&lt;br&gt;
Timing issues are one of Selenium’s biggest pain points. Tests often fail because elements are not ready or page states change unexpectedly.&lt;/p&gt;
&lt;p&gt;This creates unstable pipelines and unreliable regression runs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Developer dependency&lt;/strong&gt;&lt;br&gt;
Selenium is code-first. That means QA teams need technical expertise to build and maintain tests.&lt;/p&gt;
&lt;p&gt;In many teams, only a few engineers can actually work on automation.&lt;/p&gt;
&lt;p&gt;That creates bottlenecks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Infrastructure management&lt;/strong&gt;&lt;br&gt;
Scaling Selenium usually requires browser grids, CI setup, and execution infrastructure.&lt;/p&gt;
&lt;p&gt;This adds operational overhead that many teams want to avoid.&lt;/p&gt;
&lt;h3 id=&quot;best-selenium-alternatives-in-2026&quot;&gt;Best Selenium Alternatives in 2026&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;1. &lt;a rel=&quot;nofollow&quot; href=&quot;https://qality.dev&quot;&gt;QAlity&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Best for: No-code web automation for SaaS teams&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;QAlity is a no-code test automation platform built for modern web application teams.&lt;/p&gt;
&lt;p&gt;Instead of writing scripts, teams can record workflows directly in Chrome and turn them into reusable automated tests.&lt;/p&gt;
&lt;p&gt;The biggest advantage of QAlity is Auto-Heal. When UI elements change, it intelligently updates test steps instead of failing.&lt;/p&gt;
&lt;p&gt;This dramatically reduces maintenance effort.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No-code workflow recording&lt;/li&gt;
&lt;li&gt;Cloud-based execution&lt;/li&gt;
&lt;li&gt;AI-powered step generation&lt;/li&gt;
&lt;li&gt;Auto-Heal for UI changes&lt;/li&gt;
&lt;li&gt;Screenshots at every test step&lt;/li&gt;
&lt;li&gt;Scheduled and on-demand runs&lt;/li&gt;
&lt;li&gt;Easy collaboration across QA and product teams&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt;&lt;br&gt;
Focused on web application testing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt;&lt;br&gt;
Startups, SaaS companies, and QA teams that want automation without writing code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. &lt;a rel=&quot;nofollow&quot; href=&quot;https://playwright.dev&quot;&gt;Playwright&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Best for: Fast and reliable open-source automation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Playwright has become the strongest technical replacement for Selenium.&lt;/p&gt;
&lt;p&gt;Built by Microsoft, it uses native browser communication instead of WebDriver, making it faster and more stable.&lt;/p&gt;
&lt;p&gt;Its built-in waiting system reduces flaky tests significantly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fast execution&lt;/li&gt;
&lt;li&gt;Multi-browser support&lt;/li&gt;
&lt;li&gt;Parallel testing&lt;/li&gt;
&lt;li&gt;Powerful debugging tools&lt;/li&gt;
&lt;li&gt;Strong CI integration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt;&lt;br&gt;
Still requires coding knowledge.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt;&lt;br&gt;
Engineering teams with JavaScript, TypeScript, or Python expertise.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. &lt;a rel=&quot;nofollow&quot; href=&quot;https://cypress.io&quot;&gt;Cypress&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Best for: Front-end developer testing&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Cypress is one of the most popular tools for front-end teams.&lt;/p&gt;
&lt;p&gt;It runs directly inside the browser, giving developers better visibility into application behavior during test execution.&lt;/p&gt;
&lt;p&gt;Its developer experience is one of the best in the market.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Live test runner&lt;/li&gt;
&lt;li&gt;Easy debugging&lt;/li&gt;
&lt;li&gt;Strong developer workflow&lt;/li&gt;
&lt;li&gt;Fast feedback loop&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt;&lt;br&gt;
Mostly JavaScript-focused and less flexible for non-technical QA teams.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt;&lt;br&gt;
Frontend development teams.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. &lt;a rel=&quot;nofollow&quot; href=&quot;https://katalon.com&quot;&gt;Katalon&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Best for: Enterprise and low-code automation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Katalon offers a low-code approach and supports web, API, mobile, and desktop testing.&lt;/p&gt;
&lt;p&gt;It is popular among larger organizations that need centralized reporting and broader test coverage.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multi-platform support&lt;/li&gt;
&lt;li&gt;Reporting and analytics&lt;/li&gt;
&lt;li&gt;Team collaboration&lt;/li&gt;
&lt;li&gt;Enterprise governance&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt;&lt;br&gt;
Can feel complex for smaller teams.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt;&lt;br&gt;
Enterprise QA teams with larger automation needs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. &lt;a rel=&quot;nofollow&quot; href=&quot;https://testrigor.com&quot;&gt;testRigor&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Best for: AI-powered test automation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;testRigor focuses on natural language-based test creation.&lt;/p&gt;
&lt;p&gt;Instead of coding or complex selectors, users can write test cases in plain English.&lt;/p&gt;
&lt;p&gt;This makes automation easier for non-technical teams.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Natural language testing&lt;/li&gt;
&lt;li&gt;AI-powered maintenance&lt;/li&gt;
&lt;li&gt;Self-healing capabilities&lt;/li&gt;
&lt;li&gt;Faster test creation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt;&lt;br&gt;
Less flexible for highly customized workflows.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt;&lt;br&gt;
Teams looking for AI-first automation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. &lt;a rel=&quot;nofollow&quot; href=&quot;https://bugbug.io&quot;&gt;BugBug&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Best for: Lightweight browser automation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;BugBug is designed for simplicity.&lt;/p&gt;
&lt;p&gt;It allows users to record browser actions and create automated tests without complex setup.&lt;/p&gt;
&lt;p&gt;Its lightweight nature makes it a practical option for teams moving away from Selenium.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Browser-based recording&lt;/li&gt;
&lt;li&gt;Cloud execution&lt;/li&gt;
&lt;li&gt;Simple UI&lt;/li&gt;
&lt;li&gt;Quick setup&lt;/li&gt;
&lt;li&gt;Minimal learning curve&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt;&lt;br&gt;
Focused mainly on web applications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt;&lt;br&gt;
Startups and growing teams looking for fast onboarding.&lt;/p&gt;
&lt;h3 id=&quot;how-to-choose-the-right-selenium-alternative-&quot;&gt;How to Choose the Right Selenium Alternative?&lt;/h3&gt;
&lt;p&gt;The right tool depends on your team.&lt;/p&gt;
&lt;p&gt;Ask yourself:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who will create and maintain the tests?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If your developers own automation, tools like Playwright and Cypress are excellent.&lt;/p&gt;
&lt;p&gt;If your QA team includes manual testers, product managers, or non-technical contributors, no-code tools like QAlity, testRigor, or BugBug may be a better fit.&lt;/p&gt;
&lt;p&gt;Also consider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Release frequency&lt;/li&gt;
&lt;li&gt;Team size&lt;/li&gt;
&lt;li&gt;Maintenance bandwidth&lt;/li&gt;
&lt;li&gt;Technical skill level&lt;/li&gt;
&lt;li&gt;Infrastructure requirements&lt;br&gt;
The best automation tool is not always the most powerful. It is the one your team can use consistently.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;should-you-move-away-from-selenium-&quot;&gt;Should You Move Away from Selenium?&lt;/h3&gt;
&lt;p&gt;For many teams, yes.&lt;/p&gt;
&lt;p&gt;The hidden cost of Selenium is not licensing. It is maintenance, flaky failures, and engineering time spent fixing automation instead of shipping features.&lt;/p&gt;
&lt;p&gt;Modern alternatives reduce that burden.&lt;/p&gt;
&lt;p&gt;Some improve reliability. Some simplify authoring. Some remove code completely.&lt;/p&gt;
&lt;p&gt;The right choice depends on how your team works.&lt;/p&gt;
&lt;p&gt;If your goal is speed and flexibility, Playwright is a strong option.&lt;/p&gt;
&lt;p&gt;If your goal is making automation accessible to everyone, &lt;a rel=&quot;nofollow&quot; href=&quot;https://qality.dev/&quot;&gt;QAlity&lt;/a&gt; offers a much simpler path.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/23120/best-selenium-alternatives-in-2026-top-testing-tools-to-replace-selenium</guid>
<pubDate>Tue, 21 Jul 2026 07:55:56 +0000</pubDate>
</item>
<item>
<title>Python Selenium: chromedriver executable needs to be in PATH</title>
<link>https://coderlegion.com/17791/python-selenium-chromedriver-executable-needs-to-be-in-path</link>
<description>&lt;p&gt;&lt;strong&gt;The &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.selenium.dev/&quot;&gt;selenium&lt;/a&gt; webdriver exception message &lt;span style=&quot;color: #ff04fc;&quot;&gt;'chromedriver' executable needs to be in PATH&lt;/span&gt; is triggered if selenium could not find the &lt;a rel=&quot;nofollow&quot; href=&quot;https://chromedriver.chromium.org/home&quot;&gt;chromedriver&lt;/a&gt; file based on the user's code that calls &lt;span style=&quot;color: #ff04fc;&quot;&gt;webdriver.Chrome(executable_path='chromedriver')&lt;/span&gt;. It is the user or programmer's responsibility to let selenium know this &lt;span style=&quot;color: #ff04fc;&quot;&gt;executable_path&lt;/span&gt;. Defining a path in windows OS can be challenging sometimes as the user has to do some editing in the &lt;span style=&quot;color: #ff04fc;&quot;&gt;system environment variables&lt;/span&gt;. Is there any other way to define the path? Sure there is, and we will discuss this issue, including some ways to solve it.&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc-div&quot;&gt;
&lt;h4&gt;&lt;strong&gt; Table of Contents&lt;a id=&quot;toc-toogle&quot; class=&quot;open&quot;&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/h4&gt;
&lt;div id=&quot;toc-list&quot;&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#what&quot;&gt;&lt;strong&gt;What is the problem?&lt;/strong&gt;&lt;/a&gt;
  &lt;ol&gt;
    &lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#replication&quot;&gt;&lt;strong&gt;Error message replication&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#how&quot;&gt;&lt;strong&gt;How to avoid this error?&lt;/strong&gt;&lt;/a&gt;
  &lt;ol&gt;
    &lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#env&quot;&gt;&lt;strong&gt;Add chromedriver path in the system environment variables&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#path&quot;&gt;&lt;strong&gt;Define the path directly&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#webdriver&quot;&gt;&lt;strong&gt;Use webdriver-manager&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ol&gt;  
&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#con&quot;&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#ref&quot;&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;section&gt;&lt;a id=&quot;what&quot; class=&quot;custom_anchor&quot;&gt;&lt;/a&gt;
&lt;h2&gt;&lt;strong&gt;1.  What is the problem? &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#what&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;p&gt;Our trouble starts when we try to use the power of selenium. &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.selenium.dev/&quot;&gt;Selenium&lt;/a&gt; is a tool for automating web browsers. It can interact with web pages such as &lt;strong&gt;web scraping&lt;/strong&gt;, &lt;strong&gt;browser automation&lt;/strong&gt; and others. To manipulate these pages, &lt;strong&gt;selenium&lt;/strong&gt; needs a program called &lt;a rel=&quot;nofollow&quot; href=&quot;https://chromedriver.chromium.org/home&quot;&gt;chromedriver&lt;/a&gt; for chrome browsers.&lt;/p&gt;
&lt;section&gt;&lt;a id=&quot;replication&quot; class=&quot;custom_anchor&quot;&gt;&lt;/a&gt;
&lt;h3&gt;&lt;strong&gt;1.1.  Error message replication &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#replication&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h3&gt;
&lt;/section&gt;
&lt;p&gt;I will use python &lt;a rel=&quot;nofollow&quot; href=&quot;https://pypi.org/project/selenium/3.141.0/&quot;&gt;selenium version 3.141.0&lt;/a&gt; to reproduce this error message. The parameter &lt;strong&gt;executable_path&lt;/strong&gt; which you will see soon is not yet deprecated in this selenium version. First we need to &lt;strong&gt;install selenium&lt;/strong&gt; from command line:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pip install selenium==3.141.0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215643436-bb0133f2-efac-4641-a6cd-ee2480d63fb0.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;Let us create a code which will scrape some &lt;strong&gt;quotes&lt;/strong&gt; from &lt;a rel=&quot;nofollow&quot; href=&quot;https://quotes.toscrape.com/&quot;&gt;https://quotes.toscrape.com/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Filename: sample.py&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;code&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from selenium import webdriver

# Define the path of the chrome driver to be used by selenium.
# Selenium expects that the chromedriver.exe path is in the
# Path variable on the systems environment variable.
driver = webdriver.Chrome(executable_path='chromedriver')

url = 'https://quotes.toscrape.com/'
driver.get(url)

quotes = driver.find_elements('xpath', '//span[@class=&quot;text&quot;]')

for q in quotes:
    print(q.text)

driver.quit()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the line:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;driver = webdriver.Chrome(executable_path='chromedriver')
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;strong&gt;chromedriver&lt;/strong&gt; is the default value of the &lt;strong&gt;executable_path&lt;/strong&gt; parameter. Selenium expects the file chromedriver.exe to be in the window's system environment variable. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Run the script from command line&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python sample.py
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;output&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;div-pink&quot;&gt;
&lt;span class=&quot;alert-header&quot;&gt;Caution&lt;/span&gt;
&lt;span class=&quot;alert-body&quot;&gt;'chromedriver' executable needs to be in PATH.&lt;/span&gt;
&lt;/div&gt;
&lt;p&gt;Right we got the &lt;strong&gt;exception&lt;/strong&gt; message. It is not that difficult to interpret that message. &lt;strong&gt;Selenium&lt;/strong&gt; cannot find the &lt;strong&gt;chromedriver.exe&lt;/strong&gt;, as we have not yet revised our &lt;strong&gt;system environment variables&lt;/strong&gt;. We also have &lt;strong&gt;not downloaded&lt;/strong&gt; yet the &lt;strong&gt;chromedriver.exe&lt;/strong&gt;. In the next section, we will &lt;strong&gt;solve&lt;/strong&gt; this issue.&lt;/p&gt;
&lt;section&gt;&lt;a id=&quot;how&quot; class=&quot;custom_anchor&quot;&gt;&lt;/a&gt;
&lt;h2&gt;&lt;strong&gt;2.  How to avoid this error? &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#how&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;p&gt;Let us continue from the &lt;strong&gt;Error message replication&lt;/strong&gt; in section 1.1. We will &lt;strong&gt;fix&lt;/strong&gt; this error step by step. I am going to use windows 10.&lt;/p&gt;
&lt;section&gt;&lt;a id=&quot;env&quot; class=&quot;custom_anchor&quot;&gt;&lt;/a&gt;
&lt;h3&gt;&lt;strong&gt;2.1.  Add chromedriver path in the system environment variables &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#env&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h3&gt;
&lt;/section&gt;
&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Download the &lt;strong&gt;chromedriver.exe&lt;/strong&gt; and be sure to download the chromedriver &lt;strong&gt;version&lt;/strong&gt; that is similar to the version of the chrome browser you use.&lt;/p&gt;
&lt;p&gt;To check the chrome browser version, see the following guide.&lt;/p&gt;
&lt;p&gt;(1) Open the browser and press the menu.&lt;br&gt;
(2) Select/Hover help.&lt;br&gt;
(3) Press About.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215565326-df033ddd-0a6e-4a43-88a6-26a36577a8c4.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;And we will see this.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215565541-6900e0d1-46cc-4116-b95f-554b5e7cd09c.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now download the chromedriver at &lt;a rel=&quot;nofollow&quot; href=&quot;https://chromedriver.chromium.org/downloads&quot;&gt;https://chromedriver.chromium.org/downloads&lt;/a&gt;. Keep note on the version. Once done unzip it and put it in &lt;strong&gt;C:\selenium_chrome_driver&lt;/strong&gt; folder.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Tree&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;C:\selenium_chrome_driver
    chromedriver.exe
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That means &lt;strong&gt;chromedriver.exe&lt;/strong&gt; is under the selenium_chrome_driver &lt;strong&gt;folder&lt;/strong&gt;. Both are under drive &lt;strong&gt;C&lt;/strong&gt;. We have to &lt;strong&gt;remember&lt;/strong&gt; this location because we will use it in &lt;strong&gt;2 of the 3&lt;/strong&gt; solutions to &lt;strong&gt;fix&lt;/strong&gt; this issue.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let us try to access the &lt;strong&gt;system environment variables&lt;/strong&gt; from your desktop or laptop.&lt;/p&gt;
&lt;p&gt;(1) Search button&lt;br&gt;
(2) Type &lt;strong&gt;environ&lt;/strong&gt;&lt;br&gt;
(3) Press the &lt;strong&gt;Edit the system ...&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215489452-631a04ad-d452-4591-aab1-a09a61b38231.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;And we will see this.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215490572-4aedb573-fac1-4626-a567-35b001006028.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;(1) Press the button.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215491237-c5660d21-7d10-4dd5-858e-848364802c41.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;And we will see this.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215491976-0f85fee5-54d9-4bba-b30f-877f97b1070c.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Find the &lt;strong&gt;Path&lt;/strong&gt; variable name from System variables.&lt;/p&gt;
&lt;p&gt;(1) Use the scroll to find it if necessary.&lt;br&gt;
(2) That is our target, select it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215492856-17c1f681-403f-4c6c-b195-a7d4812f3bb6.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 5&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;(1) Select the path&lt;br&gt;
(2) Press edit button so we can add the &lt;strong&gt;chromedriver.exe&lt;/strong&gt; path.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215495306-13b42e75-5821-4657-9619-67fde63fb6f8.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;And we will see this.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215667882-168312a7-6b2d-41bf-bcd7-2c09f765b8bf.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 6&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;(1) Press the new button.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215496312-ade52f46-fa23-47c8-9267-189844c4769e.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;And we will see this.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215498333-0efb94e6-3b97-4600-9235-44e68b0c681a.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 7&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;(1) Type the path of our &lt;strong&gt;chromedriver.exe&lt;/strong&gt;.&lt;br&gt;
(2) Press OK&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215500569-b811ae0c-611c-42c8-84a7-f2e20efef435.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;Press &lt;strong&gt;OK&lt;/strong&gt; for all windows to exit and we are done.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to check if chromedriver.exe path is set?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Close&lt;/strong&gt; all the opened console and open a new console. Check if &lt;strong&gt;chromedriver.exe path&lt;/strong&gt; has been successfully added to the &lt;strong&gt;Path&lt;/strong&gt; variable in the system environment variables.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/22366935/215502115-e74856a0-8524-4ddc-8f5b-d396453df496.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;p&gt;All right it is there. Although the &lt;strong&gt;chromedriver.exe&lt;/strong&gt; is located in &lt;strong&gt;C:\selenium_chrome_driver&lt;/strong&gt;, the executable can now be called from any other directory. This is the point of adding the chromedriver path to the &lt;strong&gt;Path&lt;/strong&gt; variable in the system environment variables. We can now create our code or &lt;strong&gt;script&lt;/strong&gt; from any directory and selenium will be able to find it.&lt;/p&gt;
&lt;p&gt;For example, we can create &lt;strong&gt;sample.py&lt;/strong&gt; from any drive or folder like &lt;strong&gt;F:\samples\sample.py&lt;/strong&gt; or &lt;strong&gt;C:\myscraper\sample.py&lt;/strong&gt; and others.&lt;/p&gt;
&lt;p&gt;Now let us run the sample.py from the code at the top.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PS F:\Project\my_selenium_3&amp;gt;python sample.py
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;output&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;“The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.”
“It is our choices, Harry, that show what we truly are, far more than our abilities.”
“There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.”
“The person, be it gentleman or lady, who has not pleasure in a good novel, must be intolerably stupid.”
“Imperfection is beauty, madness is genius and it's better to be absolutely ridiculous than absolutely boring.”
“Try not to become a man of success. Rather become a man of value.”
“It is better to be hated for what you are than to be loved for what you are not.”
“I have not failed. I've just found 10,000 ways that won't work.”
“A woman is like a tea bag; you never know how strong it is until it's in hot water.”
“A day without sunshine is like, you know, night.”
&lt;/code&gt;&lt;/pre&gt;
&lt;section&gt;&lt;a id=&quot;path&quot; class=&quot;custom_anchor&quot;&gt;&lt;/a&gt;
&lt;h3&gt;&lt;strong&gt;2.2.  Define the path directly &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#path&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h3&gt;
&lt;/section&gt;
&lt;p&gt;Here is the code that &lt;strong&gt;inform&lt;/strong&gt; selenium on the location of the &lt;strong&gt;chromedriver.exe&lt;/strong&gt; directly in the &lt;strong&gt;executable_path&lt;/strong&gt; parameter.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;code&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from selenium import webdriver

# Define the path directly.
driver = webdriver.Chrome(executable_path='C:/selenium_chrome_driver/chromedriver.exe')

url = 'https://quotes.toscrape.com/'
driver.get(url)

quotes = driver.find_elements('xpath', '//span[@class=&quot;text&quot;]')

for q in quotes:
    print(q.text)

driver.quit()

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;output&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;“The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.”
“It is our choices, Harry, that show what we truly are, far more than our abilities.”
“There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.”
“The person, be it gentleman or lady, who has not pleasure in a good novel, must be intolerably stupid.”
“Imperfection is beauty, madness is genius and it's better to be absolutely ridiculous than absolutely boring.”
“Try not to become a man of success. Rather become a man of value.”
“It is better to be hated for what you are than to be loved for what you are not.”
“I have not failed. I've just found 10,000 ways that won't work.”
“A woman is like a tea bag; you never know how strong it is until it's in hot water.”
“A day without sunshine is like, you know, night.”

&lt;/code&gt;&lt;/pre&gt;
&lt;section&gt;&lt;a id=&quot;webdriver&quot; class=&quot;custom_anchor&quot;&gt;&lt;/a&gt;
&lt;h3&gt;&lt;strong&gt;2.3.  Use webdriver-manager &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#webdriver&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h3&gt;
&lt;/section&gt;
&lt;p&gt;The code below uses the &lt;a rel=&quot;nofollow&quot; href=&quot;https://pypi.org/project/webdriver-manager/&quot;&gt;webdriver-manager&lt;/a&gt; package.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&quot;&quot;&quot;Scrapes quotes from the given url.

The url is 'https://quotes.toscrape.com/'.
We need to install the following packages.
  pip install selenium==3.141.0
  pip install webdriver-manager
&quot;&quot;&quot;
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

# Use webdriver manager.
driver = webdriver.Chrome(ChromeDriverManager().install())

url = 'https://quotes.toscrape.com/'
driver.get(url)

quotes = driver.find_elements('xpath', '//span[@class=&quot;text&quot;]')

for q in quotes:
    print(q.text)

driver.quit()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If we run this, the &lt;strong&gt;output&lt;/strong&gt; will be the same as in the previous output. The main &lt;strong&gt;advantage&lt;/strong&gt; of this solution is &lt;strong&gt;we no longer have to download&lt;/strong&gt; the &lt;strong&gt;chromedriver.exe&lt;/strong&gt; or touching the system environment variable, etc. What is required is to install the new package together with the usual selenium.&lt;/p&gt;
&lt;p&gt;From command line &lt;strong&gt;install&lt;/strong&gt; the following.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pip install selenium==3.141.0
pip install webdriver-manager
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;div-purple&quot;&gt;
&lt;span class=&quot;alert-header&quot;&gt;Tip&lt;/span&gt;
&lt;span class=&quot;alert-body&quot;&gt;The chromedriver binary does not need to be downloaded if the webdriver-manager is utilized.&lt;/span&gt;
&lt;/div&gt;
&lt;section&gt;&lt;a id=&quot;con&quot; class=&quot;custom_anchor&quot;&gt;&lt;/a&gt;
&lt;h2&gt;&lt;strong&gt;3.  Conclusion &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#con&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;p&gt;The &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.selenium.dev/&quot;&gt;&lt;strong&gt;selenium&lt;/strong&gt;&lt;/a&gt; exception or error message &lt;span style=&quot;color: #ff04fc;&quot;&gt;&lt;strong&gt;'chromedriver' executable needs to be in PATH&lt;/strong&gt;&lt;/span&gt; pops up if the &lt;strong&gt;webdriver.Chrome()&lt;/strong&gt; is instantiated without defining the &lt;strong&gt;executable_path&lt;/strong&gt; of the &lt;strong&gt;chromedriver.exe&lt;/strong&gt;. &lt;strong&gt;Selenium&lt;/strong&gt; needs this browser driver to do its work. This &lt;strong&gt;error&lt;/strong&gt; can be prevented by either properly defining the &lt;strong&gt;path of chromedriver.exe&lt;/strong&gt; in the Path's variable in the &lt;strong&gt;system environment variables&lt;/strong&gt;, directly use the path in &lt;strong&gt;the executable_path&lt;/strong&gt; parameter, or use the  &lt;a rel=&quot;nofollow&quot; href=&quot;https://pypi.org/project/webdriver-manager/&quot;&gt;&lt;strong&gt;webdriver-manager&lt;/strong&gt;&lt;/a&gt; for a more modern approach.&lt;/p&gt;
&lt;p&gt;The latest version of python selenium is currently &lt;a rel=&quot;nofollow&quot; href=&quot;https://pypi.org/project/selenium/4.8.0/&quot;&gt;&lt;strong&gt;4.8.0&lt;/strong&gt;&lt;/a&gt;. The &lt;strong&gt;executable_path&lt;/strong&gt; parameter is now deprecated if it is used as in &lt;a rel=&quot;nofollow&quot; href=&quot;#path&quot;&gt;section 2.2&lt;/a&gt;.&lt;/p&gt;
&lt;section&gt;&lt;a id=&quot;ref&quot; class=&quot;custom_anchor&quot;&gt;&lt;/a&gt;
&lt;h2&gt;&lt;strong&gt;4.  References &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#ref&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;ul&gt;
&lt;li&gt;ChromeDriver - WebDriver for Chrome. (n.d.). Retrieved January 30, 2023, from &lt;a rel=&quot;nofollow&quot; href=&quot;https://chromedriver.chromium.org/home&quot;&gt;https://chromedriver.chromium.org/home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ChromeDriver - WebDriver for Chrome - Downloads. (n.d.). &lt;a rel=&quot;nofollow&quot; href=&quot;https://chromedriver.chromium.org/downloads&quot;&gt;https://chromedriver.chromium.org/downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Quotes to Scrape. (n.d.). Retrieved January 31, 2023, from &lt;a rel=&quot;nofollow&quot; href=&quot;https://quotes.toscrape.com/&quot;&gt;https://quotes.toscrape.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Selenium with Python — Selenium Python Bindings 2 documentation. (n.d.). Retrieved February 3, 2023, from &lt;a rel=&quot;nofollow&quot; href=&quot;https://selenium-python.readthedocs.io/index.html&quot;&gt;https://selenium-python.readthedocs.io/index.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Selenium-Dev. (n.d.). &lt;strong&gt;Selenium&lt;/strong&gt;. Retrieved January 30, 2023, from &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.selenium.dev/&quot;&gt;https://www.selenium.dev/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;selenium==3.141.0. (2018, November 1). &lt;strong&gt;PyPI&lt;/strong&gt;. Retrieved January 31, 2023, from &lt;a rel=&quot;nofollow&quot; href=&quot;https://pypi.org/project/selenium/3.141.0/&quot;&gt;https://pypi.org/project/selenium/3.141.0/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;selenium==4.8.0. (2023, January 23). &lt;strong&gt;PyPI&lt;/strong&gt;. Retrieved February 2, 2023, from &lt;a rel=&quot;nofollow&quot; href=&quot;https://pypi.org/project/selenium/4.8.0/&quot;&gt;https://pypi.org/project/selenium/4.8.0/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;webdriver-manager. (2022, November 16). &lt;strong&gt;PyPI&lt;/strong&gt;. Retrieved January 31, 2023, from &lt;a rel=&quot;nofollow&quot; href=&quot;https://pypi.org/project/webdriver-manager/&quot;&gt;https://pypi.org/project/webdriver-manager/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/17791/python-selenium-chromedriver-executable-needs-to-be-in-path</guid>
<pubDate>Thu, 14 May 2026 05:56:08 +0000</pubDate>
</item>
</channel>
</rss>