with page.expect_file_chooser() as fc_info:
page.locator("span[role=\"button\"] button:has-text(\"导入\")").click()
file_chooser = fc_info.value
file_chooser.set_files("*****.xlsx")
Playwright操作文件弹窗上传文件
最新推荐文章于 2024-06-07 23:04:15 发布