Skip to content

Commit 46ca204

Browse files
committed
[py] Update test with new fixture
1 parent 7a2b6c1 commit 46ca204

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

py/test/selenium/webdriver/chrome/chrome_service_tests.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import pytest
2424

2525
from selenium.common.exceptions import SessionNotCreatedException
26-
from selenium.webdriver.chrome.options import Options
2726
from selenium.webdriver.chrome.service import Service
2827

2928

@@ -109,12 +108,12 @@ def test_log_output_null_default(driver, capfd) -> None:
109108

110109

111110
@pytest.mark.no_driver_after_test
112-
def test_driver_is_stopped_if_browser_cant_start(clean_driver, driver_executable) -> None:
113-
options = Options()
114-
options.add_argument("--user-data-dir=/no/such/location")
111+
def test_driver_is_stopped_if_browser_cant_start(clean_driver, clean_options, driver_executable) -> None:
112+
#options = Options()
113+
clean_options.add_argument("--user-data-dir=/no/such/location")
115114
service = Service(executable_path=driver_executable)
116115
with pytest.raises(SessionNotCreatedException):
117-
clean_driver(options=options, service=service)
116+
clean_driver(options=clean_options, service=service)
118117
assert not service.is_connectable()
119118
assert service.process.poll() is not None
120119

py/test/selenium/webdriver/edge/edge_service_tests.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import pytest
2424

2525
from selenium.common.exceptions import SessionNotCreatedException
26-
from selenium.webdriver.edge.options import Options
2726
from selenium.webdriver.edge.service import Service
2827

2928

@@ -109,12 +108,11 @@ def test_log_output_null_default(driver, capfd) -> None:
109108

110109

111110
@pytest.mark.no_driver_after_test
112-
def test_driver_is_stopped_if_browser_cant_start(clean_driver, clean_service, driver_executable) -> None:
113-
options = Options()
114-
options.add_argument("--user-data-dir=/no/such/location")
111+
def test_driver_is_stopped_if_browser_cant_start(clean_driver, clean_options, clean_service, driver_executable) -> None:
112+
clean_options.add_argument("--user-data-dir=/no/such/location")
115113
service = Service(executable_path=driver_executable)
116114
with pytest.raises(SessionNotCreatedException):
117-
clean_driver(options=options, service=service)
115+
clean_driver(options=clean_options, service=service)
118116
assert not service.is_connectable()
119117
assert service.process.poll() is not None
120118

0 commit comments

Comments
 (0)