Skip to content

Commit 7a51f11

Browse files
author
youtianzhang
committed
处理acknowledgement浮层问题
1 parent 4e9886a commit 7a51f11

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

browser_utils/page_controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ async def submit_prompt(self, prompt: str,image_list: List, check_client_disconn
479479
# 当文件选择器出现时,它会得到 FileChooser 对象
480480
function_btn_localtor = self.page.locator('button[aria-label="Insert assets such as images, videos, files, or audio"]')
481481
await function_btn_localtor.click()
482-
asyncio.sleep(0.5)
482+
#asyncio.sleep(0.5)
483483
async with self.page.expect_file_chooser() as fc_info:
484484
# 2. 点击那个会触发文件选择的普通按钮
485485
upload_btn_localtor = self.page.locator(UPLOAD_BUTTON_SELECTOR)
@@ -494,7 +494,7 @@ async def submit_prompt(self, prompt: str,image_list: List, check_client_disconn
494494
await file_chooser.set_files(image_list)
495495
print(f"已将 '{image_list}' 设置到文件选择器。")
496496

497-
asyncio.sleep(0.2)
497+
#asyncio.sleep(0.2)
498498
acknow_btn_locator = self.page.locator('button[aria-label="Agree to the copyright acknowledgement"]')
499499
if await acknow_btn_locator.count() > 0:
500500
await acknow_btn_locator.click()

0 commit comments

Comments
 (0)