From 552c6270640f39262bb8e63a28075f9e787526e8 Mon Sep 17 00:00:00 2001 From: Joshua Fehler Date: Sun, 16 Jun 2024 22:36:00 -0400 Subject: [PATCH] Add missing test case for edgedriver --- .../test_local_driver_not_found.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/tests_webdriver_local/test_local_driver_not_found.py b/tests/tests_webdriver_local/test_local_driver_not_found.py index 78639d627..a8ce6b421 100644 --- a/tests/tests_webdriver_local/test_local_driver_not_found.py +++ b/tests/tests_webdriver_local/test_local_driver_not_found.py @@ -4,16 +4,21 @@ def test_webdriver_local_driver_not_found(browser_name): - """When chromedriver/geckodriver are not present on the system.""" + """When chromedriver/geckodriver/edgedriver are not present on the system.""" from splinter import Browser - from selenium.webdriver.chrome.service import Service as ChromeService - from selenium.webdriver.firefox.service import Service as FirefoxService - if browser_name == "chrome": + from selenium.webdriver.chrome.service import Service as ChromeService + service = ChromeService(executable_path="failpath") - else: + elif browser_name == "firefox": + from selenium.webdriver.firefox.service import Service as FirefoxService + service = FirefoxService(executable_path="failpath") + elif browser_name == "edge": + from selenium.webdriver.edge.service import Service as EdgeService + + service = EdgeService(executable_path="failpath") with pytest.raises(WebDriverException): Browser(browser_name, service=service)