How to install Selenium Chrome driver?
I am having some issues with the selenium python code where my program fails to download a web page as the ChromeDriver does not load or at least, I can't get the download to work. Here is my code: if name == "main": browser = webdriver.Chrome(chromeoptions=chromeoptions) url = '. browser.get(url) # This should redirects me to the appropriate result page with the correct time limit (10sec max.) print("Attempting to access to URL:", url, "with ChromeDriver"). browser.get(url) time.sleep(10) # 10 seconds before timing out # Browser should automatically be redirected back to the homepage URL. # but it doesn't. The result stays on the original URL "results" regardless of what the # redirect rule set to in the browser. print("The URL that was not automatically redirected is:", url). browser.get(url) testCode = (browser.findelementbyclassname('js-result-number')) print("Test number", testCode.text) Running the entire script will produce the following output: Attempting to access to URL: with ChromeDriver. The URL that was not automatically redirected is: The HTML Source of the new window looks like:
Related Answers
How to run Selenium Python in Chrome?
As the title said, I would like to know how to import Chrome...
How to add ChromeDriver to path?
I'm trying to ma...
How do I update ChromeDriver?
I have a python script which downloads some webpages and then...