Selenium webdriver error - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: Selenium webdriver error (/thread-24318.html) |
Selenium webdriver error - WiPi - Feb-08-2020 Hi guys, I'm very new to Python - trying to use Selenium to scrape dynamic web pages and can't even get over 1st hurdle!!! from selenium import webdriver browser = webdriver.Chrome('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe') browser.get("https://www.python.org/")The browser opens but does not connect to the requested web page and I get the following error: I have no idea why I get this error - any help appreciated.
RE: Selenium webdriver error - metulburr - Feb-08-2020 you need to download chromedriver and link to that, not your local chrome exe RE: Selenium webdriver error - WiPi - Feb-09-2020 I ran the chromedriver exe file and it opens the cmd window and just sits there ..open I ran the python code again and same error as before. RE: Selenium webdriver error - metulburr - Feb-09-2020 (Feb-09-2020, 11:07 AM)WiPi Wrote: I ran the chromedriver exe file and it opens the cmd window and just sits there ..openYou dont run that directly, you put it in your code's path. Or you can add the chromedriver's directory to Windows PATH variable to not have to put the path in your code. RE: Selenium webdriver error - WiPi - Feb-09-2020 sorry yes I realised later doh! Thank you this now works but I am sure I will have plenty more stupid questions as I get into the tough stuff! |