tor-browser

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

test_1818818_wellcare_com.py (1022B)


      1 import pytest
      2 
      3 URL = "https://www.wellcare.com/en/Oregon"
      4 ALERT_CSS = ".alert-box"
      5 MENU_CSS = "a[title='login DDL']"
      6 SELECT_CSS = "select#userSelect"
      7 
      8 
      9 async def is_fastclick_active(client):
     10    async with client.ensure_fastclick_activates():
     11        await client.navigate(URL, wait="load")
     12        # there can be multiple alerts
     13        while True:
     14            alert = client.find_css(ALERT_CSS)
     15            if not alert:
     16                break
     17            client.remove_element(alert)
     18        menu = client.await_css(MENU_CSS)
     19        client.soft_click(menu)
     20        return client.test_for_fastclick(
     21            client.await_css(SELECT_CSS, is_displayed=True)
     22        )
     23 
     24 
     25 @pytest.mark.only_platforms("android")
     26 @pytest.mark.asyncio
     27 @pytest.mark.with_interventions
     28 async def test_enabled(client):
     29    assert not await is_fastclick_active(client)
     30 
     31 
     32 @pytest.mark.only_platforms("android")
     33 @pytest.mark.asyncio
     34 @pytest.mark.without_interventions
     35 async def test_disabled(client):
     36    assert await is_fastclick_active(client)