tor-browser

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

test_1830739_117911_www_cryptoloko_com.py (713B)


      1 import pytest
      2 
      3 URL = "https://www.cryptoloko.com/webplay/?play=sweet-16-blast"
      4 IFRAME_CSS = "#gameiframe"
      5 GOOD_MSG = "GameViewModel"
      6 BAD_MSG = "UnsupportedDevice"
      7 
      8 
      9 async def check_for_message(client, message):
     10    await client.navigate(URL)
     11    client.switch_to_frame(client.await_css(IFRAME_CSS))
     12    await (await client.promise_console_message_listener(message))
     13 
     14 
     15 @pytest.mark.only_platforms("android")
     16 @pytest.mark.asyncio
     17 @pytest.mark.with_interventions
     18 async def test_enabled(client):
     19    await check_for_message(client, GOOD_MSG)
     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 check_for_message(client, BAD_MSG)