(script_browser_env: ScriptBrowserEnv)
| 22 | |
| 23 | |
| 24 | def test_basic(script_browser_env: ScriptBrowserEnv) -> None: |
| 25 | # click, fill, press, check, goto |
| 26 | env = script_browser_env |
| 27 | seq = """page.goto("https://demo.playwright.dev/todomvc/") |
| 28 | page.get_by_placeholder("What needs to be done?").click() |
| 29 | page.get_by_placeholder("What needs to be done?").fill("hello") |
| 30 | page.get_by_placeholder("What needs to be done?").press("Enter") |
| 31 | page.get_by_placeholder("What needs to be done?").fill("world") |
| 32 | page.get_by_placeholder("What needs to be done?").press("Enter") |
| 33 | page.get_by_placeholder("What needs to be done?").fill("yes") |
| 34 | page.get_by_placeholder("What needs to be done?").press("Enter") |
| 35 | page.get_by_placeholder("What needs to be done?").fill("no") |
| 36 | page.get_by_placeholder("What needs to be done?").press("Enter") |
| 37 | page.get_by_role("listitem").filter(has_text="world").get_by_role("checkbox", name="Toggle Todo").check() |
| 38 | page.get_by_role("button", name="Clear completed").click()""" |
| 39 | |
| 40 | env.reset() |
| 41 | for action in seq.split("\n"): |
| 42 | action = action.strip() |
| 43 | _, success, _, _, info = env.step(create_playwright_action(action)) |
| 44 | assert success |
| 45 | |
| 46 | |
| 47 | @pytest.mark.skip(reason="not important, but the site is flaky") |
nothing calls this directly
no test coverage detected