Spaces:
Running
Running
File size: 726 Bytes
dd39c08 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import pytest
import playwright.sync_api
from browsergym.webarena.instance import WebArenaInstance
def test_is_reachable():
# default URLs
instance = WebArenaInstance()
instance.check_status()
# unreacheable URL
with pytest.raises(RuntimeError):
instance = WebArenaInstance()
instance.urls["reddit"] = "https://invalid.url"
instance.check_status()
@pytest.mark.parametrize(
"site", ["reddit", "shopping", "shopping_admin", "gitlab", "wikipedia", "map"]
)
def test_credentials(page: playwright.sync_api.Page, site: str):
# default URLs and credentials
instance = WebArenaInstance()
instance.ui_login(site=site, page=page)
# TODO: test this more thoroughly
|