MCPcopy Create free account
hub / github.com/THUDM/AutoWebGLM / script_browser_env

Function script_browser_env

webarena/tests/conftest.py:13–23  ·  view source on GitHub ↗

Create a ScriptBrowserEnv instance for testing. It is automatically closed after the test session. This is helpful when the test failed and the browser is still open.

()

Source from the content-addressed store, hash-verified

11
12@pytest.fixture(scope="function")
13def script_browser_env() -> Generator[ScriptBrowserEnv, None, None]:
14 """Create a ScriptBrowserEnv instance for testing.
15 It is automatically closed after the test session.
16 This is helpful when the test failed and the browser is still open.
17 """
18 env = ScriptBrowserEnv(
19 headless=HEADLESS,
20 slow_mo=SLOW_MO,
21 )
22 yield env
23 env.close()
24
25
26@pytest.fixture(scope="function")

Callers

nothing calls this directly

Calls 2

closeMethod · 0.95
ScriptBrowserEnvClass · 0.90

Tested by

no test coverage detected