Issue
Now, I am using Chrome browser Version 119.0.6045.160. But the latest Chrome Driver version, I downloaded is "ChromeDriver 114.0.5735.90"
For this code in python,
from selenium import webdriver
import os
os.environ['PATH'] += r"D:/chromedriver_win32"
driver = webdriver.Chrome()
How, to fix this error?
Solution
First you need to install webdriver-manager
pip install webdriver-manager
For selenium 4 here is the demo:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(service=ChromeService(
ChromeDriverManager().install()))
driver.get("http://www.python.org")
driver.close()
If you are using selenium 3 then:
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get("http://www.python.org")
driver.close()
Answered By - Goku - stands with Palestine
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.