so I have started working on selenium, and this is my first time working with it, the code provided below opens chrome but doesnt open the url mentioned in the .get function.
from selenium import webdriver
import time
# open chrome and access the page
driver = webdriver.Chrome("C:\Program Files\Google\Chrome\Application\chrome.exe")
driver.get('https://dex.onxrp.com/?project=XREEFS')
time.sleep(5)
driver.close()
I have installed the selenium pip library, do i need something else as well for it to load the link?
CodePudding user response:
Using selenium3 the default argument which can be passed within webdriver.Chrome()
is the value of the KEY executable_path
i.e. the logical/absolute path of the ChromeDriver executable but not of google-chrome executable.
Solution
Ideally, your line of code will be:
driver = webdriver.Chrome(executable_path=r'C:\path\to\chromedriver.exe')