Skip to content

[py] Using Selenium Manager to locate drivers on PATH #12418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions py/selenium/webdriver/webkitgtk/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

from selenium.webdriver.common import service

DEFAULT_EXECUTABLE_PATH = "WebKitWebDriver"


class Service(service.Service):
"""A Service class that is responsible for the starting and stopping of
Expand All @@ -34,7 +32,7 @@ class Service(service.Service):

def __init__(
self,
executable_path: str = DEFAULT_EXECUTABLE_PATH,
executable_path: str = None,
port: int = 0,
log_path: typing.Optional[str] = None,
service_args: typing.Optional[typing.List[str]] = None,
Expand Down
5 changes: 2 additions & 3 deletions py/selenium/webdriver/webkitgtk/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver

from .options import Options
from .service import DEFAULT_EXECUTABLE_PATH
from .service import Service


Expand All @@ -30,7 +29,7 @@ class WebDriver(RemoteWebDriver):

def __init__(
self,
executable_path=DEFAULT_EXECUTABLE_PATH,
executable_path=None,
port=0,
options=None,
desired_capabilities=None,
Expand Down Expand Up @@ -59,7 +58,7 @@ def __init__(
capabilities.update(desired_capabilities)
desired_capabilities = capabilities

self.service = Service(executable_path, port=port, log_path=service_log_path)
self.service = Service()
self.service.path = DriverFinder.get_path(self.service, options)
self.service.start()

Expand Down
4 changes: 1 addition & 3 deletions py/selenium/webdriver/wpewebkit/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

from selenium.webdriver.common import service

DEFAULT_EXECUTABLE_PATH = "WPEWebDriver"


class Service(service.Service):
"""A Service class that is responsible for the starting and stopping of
Expand All @@ -34,7 +32,7 @@ class Service(service.Service):

def __init__(
self,
executable_path: str = DEFAULT_EXECUTABLE_PATH,
executable_path: str = None,
port: int = 0,
log_path: typing.Optional[str] = None,
service_args: typing.Optional[typing.List[str]] = None,
Expand Down
5 changes: 2 additions & 3 deletions py/selenium/webdriver/wpewebkit/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver

from .options import Options
from .service import DEFAULT_EXECUTABLE_PATH
from .service import Service


Expand All @@ -31,7 +30,7 @@ class WebDriver(RemoteWebDriver):

def __init__(
self,
executable_path=DEFAULT_EXECUTABLE_PATH,
executable_path=None,
port=0,
options=None,
desired_capabilities=DesiredCapabilities.WPEWEBKIT,
Expand All @@ -55,7 +54,7 @@ def __init__(
else:
options = Options()

self.service = Service(executable_path, port=port, log_path=service_log_path)
self.service = Service()
self.service.path = DriverFinder.get_path(self.service, options)
self.service.start()

Expand Down