I am new to Selenium and could use some guidance. I need to know if I can set up Selenium to us a local version of
chromedriver.exe and not look for the driver on the network. When I run my script directly from my laptop from home it works fine. But when I use VPN to connect to work and try to run the script, I get timeouts. The timeout appears when I try to set the
"driver" attribute. My environment is:
- Running on an HP laptop with Windows 11 installed.
- I'm using Anaconda/Spyder as my IDE.
- I am using Python 3.11.9.
- I am using Selenium 4.21.0.
- The simple training code I'm trying to run is:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager
print('Try to install the webdriver.exe')
driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
print('Try to open a browser')
driver.get('https://google.com')
print('We B Done')
As I said I am brand new to Selenium and would like to know if I can point to a local version of chromedriver.exe I have downloaded to my laptop?
~Ed