test_1898917_sekowf_wns_com.py (649B)
1 import pytest 2 3 URL = "https://sekowf.wns.com/sekoapin/#/login?authenticated=true&sso=true" 4 5 UNSUPPORTED_ALERT = "chrome browser" 6 LOGIN_CSS = "#logindiv" 7 8 9 @pytest.mark.asyncio 10 @pytest.mark.with_interventions 11 async def test_enabled(client): 12 await client.navigate(URL, wait="none") 13 assert client.await_css(LOGIN_CSS, is_displayed=True) 14 assert not await client.find_alert(delay=3) 15 16 17 @pytest.mark.asyncio 18 @pytest.mark.without_interventions 19 async def test_disabled(client): 20 await client.make_preload_script("window.close = function() {}") 21 await client.navigate(URL, wait="none") 22 assert await client.await_alert(UNSUPPORTED_ALERT)