test_1902379_adl_edu_tw.py (566B)
1 import asyncio 2 3 import pytest 4 5 URL = "https://adl.edu.tw/HomePage/home/" 6 7 UNSUPPORTED_TEXT = "因材網建議您使用 Chrome 瀏覽器,獲得最佳使用者體驗" 8 9 10 @pytest.mark.asyncio 11 @pytest.mark.with_interventions 12 async def test_enabled(client): 13 await client.navigate(URL) 14 await asyncio.sleep(1) 15 assert client.find_text(UNSUPPORTED_TEXT, is_displayed=False) 16 17 18 @pytest.mark.asyncio 19 @pytest.mark.without_interventions 20 async def test_disabled(client): 21 await client.navigate(URL) 22 assert client.await_text(UNSUPPORTED_TEXT, is_displayed=True)