-
Notifications
You must be signed in to change notification settings - Fork 49
WebDriver.__init__() got an unexpected keyword argument 'executable_path' #184
Copy link
Copy link
Open
Description
Hello,
I am trying to run an e2e test with splinter and a custom chromedriver executable path via the cli argument --splinter-webdriver-executable /path/to/chromedriver.
kwargs = {'executable_path': '/path/to/chromedriver'}
def _setup_chrome(driver_class, config=None, options=None, service=None, **kwargs):
"""
Returns: selenium.webdriver.Chrome || selenium.webdriver.Remote
"""
if config.user_agent is not None:
options.add_argument(f"--user-agent={config.user_agent}")
if config.incognito:
options.add_argument("--incognito")
if config.fullscreen:
options.add_argument("--kiosk")
if config.headless:
options.add_argument("--headless")
options.add_argument("--disable-gpu")
if config.extensions:
for extension in config.extensions:
options.add_extension(extension)
if driver_class == Remote:
rv = driver_class(options=options, **kwargs)
else:
> rv = driver_class(options=options, service=service, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E TypeError: WebDriver.__init__() got an unexpected keyword argument 'executable_path'
[...]
DeprecationWarning: Webdriver's executable_path argument has been deprecated.Please pass in a selenium Service object instead.
return driver(config=config, *args, **kwargs)
It seems that this option does not work anymore and that executable_path argument has been deprecated. Anything you can do?
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels