@@ -388,7 +388,7 @@ async def _adjust_google_search(self, request_params: Dict[str, Any], check_clie
388388 return
389389 action = '打開' if should_enable_search else '關閉'
390390 self .logger .info (f'[{ self .req_id } ] 🌍 (嘗試 { attempt } /{ max_retries } ) 正在{ action } Google Search...' )
391- await click_element ( self . page , toggle_locator , 'Google Search Toggle' , self . req_id )
391+ await toggle_locator . click ( force = True , timeout = 3000 )
392392 await self ._check_disconnect (check_client_disconnected , f'Google Search 開關 - 點擊{ action } 後' )
393393 await asyncio .sleep (1.0 )
394394 new_state = await toggle_locator .get_attribute ('aria-checked' )
@@ -703,8 +703,8 @@ async def _adjust_stop_sequences(self, stop_sequences, page_params_cache: dict,
703703 if normalized_requested_stops :
704704 await expect_async (stop_input_locator ).to_be_visible (timeout = 5000 )
705705 for seq in normalized_requested_stops :
706- await stop_input_locator .fill (seq , timeout = 3000 )
707- await stop_input_locator .press ('Enter' , timeout = 3000 )
706+ await stop_input_locator .fill (seq , timeout = 5000 )
707+ await stop_input_locator .press ('Enter' , timeout = 5000 )
708708 await asyncio .sleep (DELAY_AFTER_FILL )
709709 page_params_cache ['stop_sequences' ] = normalized_requested_stops
710710 self .logger .info (f'[{ self .req_id } ] 停止序列已成功设置。缓存已更新。' )
0 commit comments