Skip to content

Commit 3f758cb

Browse files
author
maebahesioru
committed
fix: replace triple_click with select_text, increase Google Search toggle wait
- triple_click not available in this Playwright version, use select_text instead - Google Search toggle: wait 0.5s -> 1.0s after click for state to update
1 parent 63aa1c9 commit 3f758cb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/browser/page_controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ async def _adjust_google_search(self, request_params: Dict[str, Any], check_clie
390390
self.logger.info(f'[{self.req_id}] 🌍 (嘗試 {attempt}/{max_retries}) 正在{action} Google Search...')
391391
await click_element(self.page, toggle_locator, 'Google Search Toggle', self.req_id)
392392
await self._check_disconnect(check_client_disconnected, f'Google Search 開關 - 點擊{action}後')
393-
await asyncio.sleep(SLEEP_LONG)
393+
await asyncio.sleep(1.0)
394394
new_state = await toggle_locator.get_attribute('aria-checked')
395395
if (new_state == 'true') == should_enable_search:
396396
self.logger.info(f'[{self.req_id}] ✅ Google Search 已{action}。')
@@ -593,7 +593,7 @@ def is_equal(val1, val2):
593593
elif attempt == 1:
594594
strategy_name = "Standard Fill"
595595
await locator.focus()
596-
await locator.triple_click()
596+
await locator.select_text()
597597
await locator.fill(str(target_value))
598598
await locator.press('Tab')
599599
await asyncio.sleep(DELAY_AFTER_FILL)

0 commit comments

Comments
 (0)