摘要:
from playwright.sync_api import sync_playwright #封装一个方法用于切换浏览器窗口页面 def switch_to_page(context,url): for page in context.pages: if url == page.url:#如果传 阅读全文
摘要:
#同步模式 from playwright.sync_api import sync_playwright #导入同步模块 #创建一个Playwright的管理器对象 with sync_playwright() as p: #等同于p=sync_playwright() #基于p创建一个浏览器对象 阅读全文