tor-browser

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

test_1579159_m_tailieu_vn.py (765B)


      1 import pytest
      2 
      3 URL = (
      4    "https://m.tailieu.vn/index/mobile/id/1654340/hash/654d7ea9c2853e5be07e2c792ea7f168"
      5 )
      6 PAGE_CSS = "#viewer > #pageContainer1"
      7 OK_ERROR_CSS = "#errorMessage"
      8 ERROR_MSG = "may not load data from http://tailieu.vn/html5/pdf.js"
      9 
     10 
     11 @pytest.mark.only_platforms("android")
     12 @pytest.mark.asyncio
     13 @pytest.mark.with_interventions
     14 async def test_enabled(client):
     15    await client.navigate(URL)
     16    page, ok_error = client.await_first_element_of(
     17        [client.css(PAGE_CSS), client.css(OK_ERROR_CSS)], is_displayed=True
     18    )
     19    assert page or ok_error
     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 client.navigate(URL, await_console_message=ERROR_MSG)