Repository navigation
Make ChromeDriver wait for navigation triggered by click - #68
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
============================================
- Coverage 89.06% 88.86% -0.21%
Complexity 197 197
============================================
Files 1 1
Lines 494 494
============================================
- Hits 440 439 -1
- Misses 54 55 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Comparison of the reference
The For extra context: in the 4 CI runs of #67 (which doesn't include this fix), |
ChromeDriver 134+ sometimes returns from click before the triggered navigation completes (or cancels it), making form submission flaky. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aik099
force-pushed
the
fix/chromedriver-navigation-wait
branch
from
October 6, 2026 08:23
b2ea86d to
4d07cf6
Compare
Member
Author
Member
|
Looks good to me. |
stof
approved these changes
Oct 6, 2026
This was referenced Oct 9, 2026
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.
Since ChromeDriver 134 a click that triggers navigation (e.g. form submission) sometimes returns before the new page is loaded, or the navigation is cancelled entirely: https://issues.chromium.org/issues/402796660
As a result,
Formtests in Chrome-based builds (chrome, chromium, edge) with Selenium 4 fail randomly (1-3 per job, different each run) because they read content of the previous page, e.g.Submit empty textarea,Advanced form second submit,Basic get form,Html 5 form radio attribute. See minkphp/driver-testsuite#110 for the discussion.Adding the
--disable-features=DeferRendererTasksAfterInputbrowser argument makes the ChromeDriver wait for navigation again (found in teamcapybara/capybara#2800). The argument is added to the default Chrome and Edge capabilities, so users get the fix too.Locally on
selenium/standalone-chromium:4,Formtests passed in 1 of 6 runs without the argument and in 6 of 6 runs with it.Note: as before, a user-provided
goog:chromeOptions(orms:edgeOptions) capability replaces the default one entirely, so in that case the argument needs to be added by the user.This PR doesn't include the fix from #67, so
WindowTesthangs will still be present here.🤖 Generated with Claude Code