test_1926501_iwebv2_thebankersbank_com.py (803B)
1 from asyncio.exceptions import TimeoutError 2 3 import pytest 4 5 URL = "https://iwebv2.thebankersbank.com/Authentication/Login" 6 UNSUPPORTED_TEXT = "switch to a supported browser" 7 8 9 async def visit_site(client): 10 try: 11 await client.navigate(URL, timeout=30, no_skip=True) 12 except TimeoutError: 13 pytest.skip("Region-locked, cannot test. Try using a VPN set to USA.") 14 return False 15 return True 16 17 18 @pytest.mark.asyncio 19 @pytest.mark.with_interventions 20 async def test_enabled(client): 21 if await visit_site(client): 22 assert not client.find_text(UNSUPPORTED_TEXT, is_displayed=True) 23 24 25 @pytest.mark.asyncio 26 @pytest.mark.without_interventions 27 async def test_disabled(client): 28 if await visit_site(client): 29 assert client.find_text(UNSUPPORTED_TEXT, is_displayed=True)