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


Messages In This Thread
Just beginning with Selenium - by JLogan3o13 - Mar-22-2020, 05:20 PM
RE: Just beginning with Selenium - by ndc85430 - Mar-22-2020, 05:23 PM
RE: Just beginning with Selenium - by JLogan3o13 - Mar-22-2020, 05:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,638 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