"""Smoke test — spustí stejný launch jako mcp_owa, drží 8 s, zavře.""" import asyncio from pathlib import Path from playwright.async_api import async_playwright PROFILE = Path(__file__).resolve().parent / "outlook_profile" async def main(): pw = await async_playwright().start() ctx = await pw.chromium.launch_persistent_context( user_data_dir=str(PROFILE), headless=False, no_viewport=True, args=["--disable-blink-features=AutomationControlled", "--start-maximized"], ) page = ctx.pages[0] if ctx.pages else await ctx.new_page() await page.goto("https://outlook.cloud.microsoft/mail/") print("OK, page open:", page.url) await asyncio.sleep(8) await ctx.close() await pw.stop() asyncio.run(main())