from playwright.async_api import async_playwright async def take_screenshot(page, path="screenshot.jpg"): await page.screenshot(path=path) return path async def click_element(page, center_x, center_y): await page.mouse.click(center_x, center_y)