tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_1934189_fdj_fr.py (952B)


      1 import pytest
      2 from webdriver.error import NoSuchElementException
      3 
      4 URL = "https://www.fdj.fr/jeux-illiko/instant-euromillions"
      5 COOKIES_ACCEPT_BUTTON_CSS = """button[title="J'accepte"]"""
      6 PLAY_BUTTON_CSS = """[id="Instant Euromillions-btn-play"]"""
      7 UNSUPPORTED_ALERT_MSG = "Cet appareil ou ce navigateur n’est pas compatible avec ce jeu"
      8 NEED_VPN_TEXT = "Accès refusé"
      9 
     10 
     11 async def start_playing(client):
     12    await client.navigate(URL)
     13    client.await_css(COOKIES_ACCEPT_BUTTON_CSS).click()
     14    client.await_css(PLAY_BUTTON_CSS).click()
     15    try:
     16        client.await_text(NEED_VPN_TEXT, is_displayed=True, timeout=4)
     17        pytest.skip("Region-locked, cannot test. Try using a VPN set to France.")
     18    except NoSuchElementException:
     19        pass
     20 
     21 
     22 @pytest.mark.only_platforms("android")
     23 @pytest.mark.asyncio
     24 @pytest.mark.without_interventions
     25 async def test_disabled(client):
     26    await start_playing(client)
     27    assert not await client.find_alert()