tor-browser

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

test_1975951_dell_com.py (900B)


      1 import asyncio
      2 
      3 import pytest
      4 
      5 URL = "https://www.dell.com/nl-nl/shop/dell-laptops/scr/laptops"
      6 
      7 PRODUCTS_CSS = ".media-gallery-mfe.variant-stack-v2"
      8 POPUP_CSS = "#didomi-notice-agree-button"
      9 IMAGES_CSS = ".media-gallery-mfe.variant-stack-v2 .hero-dell-media figure"
     10 
     11 
     12 async def are_images_fullsize(client):
     13    await client.navigate(URL, wait="none")
     14    second_product = client.await_css(PRODUCTS_CSS, all=True, is_displayed=True)[1]
     15    client.scroll_into_view(second_product)
     16    await asyncio.sleep(2)
     17    return client.execute_script(
     18        """
     19        const img = arguments[0].querySelector(".hero-dell-media figure")
     20        return img.clientWidth > 0 && img.clientHeight > 0
     21      """,
     22        second_product,
     23    )
     24 
     25 
     26 @pytest.mark.skip_platforms("mac")
     27 @pytest.mark.asyncio
     28 @pytest.mark.without_interventions
     29 async def test_regression(client):
     30    assert await are_images_fullsize(client)