Set an eager page load strategy for Chrome - #1538
Merged
Merged
Conversation
Closes #1496 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1496.
create_chrome_driverleft the page load strategy at Chrome'snormaldefault, so everydriver.getblocks untilload— all images, fonts, analytics and consent scripts included. None of that is what this package is waiting for: every element it touches is behind an explicitWebDriverWait, andwait_for_logged_inasks fordocument.readyStatedirectly where a full load is what matters. A slow third-party request on developer.vuforia.com therefore turns into time added to every navigation, and at worst into adriver.gettimeout on a page that was usable long before.eagerreturns atDOMContentLoadedinstead. The waits do the rest.This is a real behavioural change and the reason to be careful with it, so it is worth saying plainly what backs it up: CI on this PR runs the whole suite against real Vuforia on six Python/OS combinations, and every operation this package has goes through
create_chrome_driver. Ifeageris too early anywhere, that run is where it shows.The
# noqa: V101is for vulture, which sees an attribute assigned and never read.🤖 Generated with Claude Code
https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM