diff --git a/py/conftest.py b/py/conftest.py index d5bf9aca8c1ea..a16c83b3e0226 100644 --- a/py/conftest.py +++ b/py/conftest.py @@ -150,7 +150,8 @@ def fin(): options = get_options("Firefox", request.config) or webdriver.FirefoxOptions() options.set_capability("moz:firefoxOptions", {}) options.enable_downloads = True - if driver_class == "WebKitGTK": + if driver_class.lower() == "webkitgtk": + driver_class = "WebKitGTK" options = get_options(driver_class, request.config) if driver_class == "Edge": options = get_options(driver_class, request.config) diff --git a/py/selenium/webdriver/webkitgtk/service.py b/py/selenium/webdriver/webkitgtk/service.py index 7414556370bd0..defb3b3ae0684 100644 --- a/py/selenium/webdriver/webkitgtk/service.py +++ b/py/selenium/webdriver/webkitgtk/service.py @@ -14,6 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +import shutil import warnings from typing import List from typing import Mapping @@ -21,14 +22,14 @@ from selenium.webdriver.common import service -DEFAULT_EXECUTABLE_PATH: str = "WebKitWebDriver" +DEFAULT_EXECUTABLE_PATH: str = shutil.which("WebKitWebDriver") class Service(service.Service): """A Service class that is responsible for the starting and stopping of - `WPEWebDriver`. + `WebKitWebDriver`. - :param executable_path: install path of the WebKitWebDriver executable, defaults to `WebKitWebDriver`. + :param executable_path: install path of the WebKitWebDriver executable, defaults to the first `WebKitWebDriver` in `$PATH`. :param port: Port for the service to run on, defaults to 0 where the operating system will decide. :param service_args: (Optional) List of args to be passed to the subprocess when launching the executable. :param log_output: (Optional) File path for the file to be opened and passed as the subprocess stdout/stderr handler.