MCPcopy Create free account
hub / github.com/HelloZeroNet/ZeroNet / browser

Function browser

src/Test/conftest.py:228–243  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

226
227@pytest.fixture(scope="session")
228def browser(request):
229 try:
230 from selenium import webdriver
231 print("Starting chromedriver...")
232 options = webdriver.chrome.options.Options()
233 options.add_argument("--headless")
234 options.add_argument("--window-size=1920x1080")
235 options.add_argument("--log-level=1")
236 browser = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, service_log_path=os.path.devnull, options=options)
237
238 def quit():
239 browser.quit()
240 request.addfinalizer(quit)
241 except Exception as err:
242 raise pytest.skip("Test requires selenium + chromedriver: %s" % err)
243 return browser
244
245
246@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls 1

skipMethod · 0.80

Tested by

no test coverage detected