tor-browser

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

test_1898915_locator_dhl_com.py (797B)


      1 import asyncio
      2 
      3 import pytest
      4 
      5 URL = "https://locator.dhl.com/results"
      6 
      7 FAILURE_TEXT1 = "Browser not supported"
      8 FAILURE_TEXT2 = "we recommend using the latest version of the following browsers"
      9 
     10 
     11 @pytest.mark.skip_platforms("android")
     12 @pytest.mark.asyncio
     13 @pytest.mark.with_interventions
     14 async def test_enabled(client):
     15    await client.navigate(URL)
     16    await asyncio.sleep(3)
     17    assert not client.find_text(FAILURE_TEXT1, is_displayed=True)
     18    assert not client.find_text(FAILURE_TEXT2, is_displayed=True)
     19 
     20 
     21 @pytest.mark.skip_platforms("android")
     22 @pytest.mark.asyncio
     23 @pytest.mark.without_interventions
     24 async def test_disabled(client):
     25    await client.navigate(URL)
     26    assert client.await_text(FAILURE_TEXT1, is_displayed=True)
     27    assert client.await_text(FAILURE_TEXT2, is_displayed=True)