Source code

Revision control

Copy as Markdown

Other Tools

import pytest
from webdriver import NoSuchElementException
SCROLLBAR_CSS = ".scroll-element"
async def is_scrollbar_added(client):
await client.navigate(URL)
try:
assert client.await_css(SCROLLBAR_CSS, timeout=3)
return True
except NoSuchElementException:
return False
@pytest.mark.only_platforms("mac")
@pytest.mark.asyncio
@pytest.mark.with_interventions
async def test_enabled(client):
assert await is_scrollbar_added(client)
@pytest.mark.only_platforms("mac")
@pytest.mark.asyncio
@pytest.mark.without_interventions
async def test_disabled(client):
assert not await is_scrollbar_added(client)