test_1898931_facturador_afip_gob_ar.py (906B)
1 import pytest 2 from webdriver.error import NoSuchElementException 3 4 URL = "https://facturador.afip.gob.ar/#/bienvenida" 5 6 HERO_CSS = "#btnInstalar" 7 UNSUPPORTED_CSS = "img[src*=chrome]" 8 9 10 async def visit_site(client): 11 await client.navigate(URL, wait="none") 12 try: 13 client.await_css(HERO_CSS, is_displayed=True, timeout=90) 14 return True 15 except NoSuchElementException: 16 pytest.skip( 17 "Site seems to be loading very slowly. Try using a VPN set to Argentina." 18 ) 19 return False 20 21 22 @pytest.mark.asyncio 23 @pytest.mark.with_interventions 24 async def test_enabled(client): 25 assert await visit_site(client) 26 assert not client.find_css(UNSUPPORTED_CSS, is_displayed=True) 27 28 29 @pytest.mark.asyncio 30 @pytest.mark.without_interventions 31 async def test_disabled(client): 32 assert await visit_site(client) 33 assert client.find_css(UNSUPPORTED_CSS, is_displayed=True)