fix: find app iframe by selector in chrome-remote-debugging hover task#937
Merged
Merged
Conversation
The reporter now renders in its own same-origin iframe, so the `activateHoverPseudo` CDP task can no longer assume the app is the first iframe. Search each iframe for the target selector instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ryanthemanuel
approved these changes
Jul 16, 2026
cypress-example-recipes
|
||||||||||||||||||||||||||||||||||||||||
| Project |
cypress-example-recipes
|
| Branch Review |
mschile/fix-hover-pseudo-reporter-iframe
|
| Run status |
|
| Run duration | 12m 18s |
| Commit |
|
| Committer | Matthew Schile |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
3
|
|
|
36
|
|
|
0
|
|
|
634
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
15.53%
|
|
|---|---|
|
|
99
|
|
|
52
|
Accessibility
71.21%
|
|
|---|---|
|
|
7 critical
10 serious
4 moderate
1 minor
|
|
|
549
|
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.
Problem
In
examples/fundamentals__chrome-remote-debugging, theactivateHoverPseudoCDP task assumed the application-under-test was the first iframe in the flattened document:Cypress PR #34242 (reporter-in-iframe) renders the Cypress reporter/command-log into its own same-origin
#reporter-frameiframe, which sorts before the AUT iframe (#unified-runner) in document order. That makesfiltered[0]the reporter frame, soDOM.querySelectorfinds nothing,nodeIdisundefined, andCSS.forcePseudoStatethrowsError: Could not find node with given id.This currently fails the
test-binary-against-recipes-chromeCI job on that Cypress PR (specspec.cy.js, test "Hover pseudo element is active").Fix
Search each same-origin iframe for the target selector rather than assuming a fixed position. This is robust to the reporter iframe, the app iframe, and any nesting/ordering.
Verification
Ran the recipe locally against Cypress 15.17.0 — all 6 tests pass, including "Hover pseudo element is active":
The change is backward-compatible with the current released runner (single AUT iframe) and forward-compatible with the reporter-in-iframe layout.
🤖 Generated with Claude Code