Pycharm doesn't show "executable_path" and I got this error and no idea what to do

23 Views Asked by At

Traceback (most recent call last): File "C:\Users\Soe Htet Oo\PycharmProjects\PythonTesting\PythonSelenium\demoBrowser.py", line 3, in driver = webdriver.Chrome(executable_path="C:\chromedriver.exe") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: WebDriver.init() got an unexpected keyword argument 'executable_path'

I am just beginner and I got this error.

1

There are 1 best solutions below

0
Arno Kukk On

This is due to executable_path is an argument of webdriver.chrome.service.Service, see ducumentation Just use

driver = webdriver.Chrome()
# or
service = webdriver.chrome.service.Service(executable_path='path/to/your/chrome/driver')
driver = webdriver.Chrome(service=service)