Increase timeout for page load stability in Chrome evaluator

- Updated the timeout for the page load state from 10 seconds to 60 seconds to ensure better stability during page processing.
- Removed redundant retry mechanisms from the active tab checks to streamline the code while maintaining existing functionality.
- Enhanced logging to provide clearer insights into the page loading process.

These changes aim to improve the reliability of the Chrome evaluator without altering the core logic.
This commit is contained in:
yuanmengqi
2025-07-18 14:16:16 +00:00
parent fcaefe7bb4
commit 44bd66fc9a
2 changed files with 14 additions and 63 deletions

View File

@@ -1523,7 +1523,7 @@ def get_active_tab_html_parse(env, config: Dict[str, Any]):
for page in context.pages:
try:
# Wait for page to be stable before checking URL
page.wait_for_load_state("networkidle", timeout=10000)
page.wait_for_load_state("networkidle", timeout=60000)
# Check if page is still valid before accessing properties
if page.is_closed():