test_1896354_my_rhinoshield_fr.py (600B)
1 import pytest 2 from webdriver.error import NoSuchElementException 3 4 URL = "https://my.rhinoshield.fr" 5 BLOCKED_TEXT = "Veuillez utiliser Google Chrome" 6 7 8 @pytest.mark.asyncio 9 @pytest.mark.with_interventions 10 async def test_enabled(client): 11 await client.navigate(URL, wait="load") 12 try: 13 client.await_text(BLOCKED_TEXT, is_displayed=True, timeout=5) 14 assert False 15 except NoSuchElementException: 16 assert True 17 18 19 @pytest.mark.asyncio 20 @pytest.mark.without_interventions 21 async def test_disabled(client): 22 await client.navigate(URL) 23 assert client.await_text(BLOCKED_TEXT)