1313
1414from applitools .selenium import *
1515from selenium .webdriver import Chrome , ChromeOptions
16- from webdriver_manager .chrome import ChromeDriverManager
17- from selenium .webdriver .chrome .service import Service
1816
1917
2018# --------------------------------------------------------------------------------
@@ -98,23 +96,14 @@ def configuration(api_key: str, batch_info: BatchInfo):
9896 return config
9997
10098
101- @pytest .fixture (scope = 'session' )
102- def chromedriver_service ():
103- """
104- Sets up ChromeDriver and returns a Service object for initializing WebDriver objects.
105- """
106- path = ChromeDriverManager ().install ()
107- return Service (path )
108-
109-
11099# --------------------------------------------------------------------------------
111100# Function-Scope Fixtures
112101# These fixtures run one time before each test that calls them.
113102# Returned values are not cached and reused across different tests.
114103# --------------------------------------------------------------------------------
115104
116105@pytest .fixture (scope = 'function' )
117- def webdriver (headless : bool , chromedriver_service : Service ):
106+ def webdriver (headless : bool ):
118107 """
119108 Creates a WebDriver object for Chrome.
120109 Even though this test will run visual checkpoints on different browsers in the Ultrafast Grid,
@@ -123,7 +112,7 @@ def webdriver(headless: bool, chromedriver_service: Service):
123112 """
124113 options = ChromeOptions ()
125114 options .headless = headless
126- driver = Chrome (service = chromedriver_service , options = options )
115+ driver = Chrome (options = options )
127116 yield driver
128117 driver .quit ()
129118
0 commit comments