1818
1919# --------------------------------------------------------------------------------
2020# Runner Settings
21+ # These could be set by environment variables or other input mechanisms.
22+ # They are hard-coded here to keep the example project simple.
2123# --------------------------------------------------------------------------------
2224
2325USE_ULTRAFAST_GRID = True
2426USE_EXECUTION_CLOUD = False
27+ HEADLESS = False
2528
2629
2730# --------------------------------------------------------------------------------
@@ -38,17 +41,6 @@ def api_key():
3841 return os .getenv ('APPLITOOLS_API_KEY' )
3942
4043
41- @pytest .fixture (scope = 'session' )
42- def headless ():
43- """
44- Reads the headless mode setting from an environment variable.
45- Uses headless mode for Continuous Integration (CI) execution.
46- Uses headed mode for local development.
47- """
48- h = os .getenv ('HEADLESS' , default = 'false' )
49- return h .lower () == 'true'
50-
51-
5244@pytest .fixture (scope = 'session' )
5345def runner ():
5446 """
@@ -120,14 +112,14 @@ def configuration(api_key: str, batch_info: BatchInfo):
120112# --------------------------------------------------------------------------------
121113
122114@pytest .fixture (scope = 'function' )
123- def webdriver (headless : bool ):
115+ def webdriver ():
124116 """
125117 Creates a WebDriver object for Chrome.
126118 After the test function finishes execution, quits the browser.
127119 """
128120
129121 options = ChromeOptions ()
130- options .headless = headless
122+ options .headless = HEADLESS
131123
132124 if USE_EXECUTION_CLOUD :
133125 driver = Remote (
0 commit comments