Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Just beginning with Selenium
#1
I have used Selenium in other languages, just beginning to look at it in python. I am curious if anyone else has run into this issue; or if I am missing something stupid simple.

Simple code:

from selenium import  webdriver

browser = webdriver.Chrome()
print(type(browser))
returns an error:

Quote:selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/...river/home

Even though the chromedriver.exe (the version that correlates to my Chrome version) is in PATH. If I just click Start Run, I can launch it fine as just chromedriver, so I know it is being found in the Path.

Edit: I should clarify, it works if I point it at the chromedriver, like so:

from selenium import webdriver

driver = webdriver.Chrome('PathTO\\chromedriver.exe')  # Optional argument, if not specified will search path.
driver.get('http://www.google.com/');
Just don't understand why I need to specify like that when it is in the environment variable.
Reply
#2
I'm not a Windows user, but I don't think being able to run executables from "Start Run" necessarily indicates that they live in one of the directories in the PATH. Can you at least check the value of PATH to make sure?
Reply
#3
I can confirm that it is in PATH, both system and user.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,621 Nov-03-2017, 08:41 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020