Skip to content

Fix window.Node, zero-sized label controls and scrollIntoView on hidden nodes - #1090

Merged
kblok merged 6 commits into
mainfrom
issue-1079-1081-page-script
Nov 5, 2026
Merged

kblok merged 6 commits into
mainfrom
issue-1079-1081-page-script

Conversation

@kblok

@kblok kblok commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Three small page-script and locator defects found while porting Playwright's click and scroll tests (#1084).

  • A page that deletes window.Node broke every observation, because the page script read that global. It now compares nodeType with the numbers, as upstream's read-semantics.ts does.
  • Tapping a label that holds a zero-sized input timed out as "not visible". Upstream's web tree lists no box-less node, so getByText lands on the label. This tree lists the input, and it won the innermost pick. A text or label query now leaves box-less matches out when a boxed one exists. A label's text is also listed now when its control has no box (before, only the control carried it), so the label is there to pick.
  • ScrollIntoViewAsync refused a visibility:hidden element. Upstream's performUntil reads no state, and scrolling needs no visibility, so a scroll into view now acts on a hidden or disabled match. Other actions still wait for an enabled match (the document engine has no actionability of its own).

Once this merges, #1084 should drop ExpectedToFailAsync from Should_click_the_button_if_window_Node_is_removed, Should_click_zero_sized_input_by_label (both in PageClickTests) and Should_work_for_visibility_hidden_element (ElementhandleScrollIntoViewTests). All three report UNEXPECTED_PASS with this change.

Upstream: tester-army/e2e bdf769b (click.e2e.ts, elementhandle-scroll-into-view.e2e.ts, packages/web/src/in-page/read-semantics.ts, packages/e2e/src/locator/engine.ts).

.NET-only tests (no upstream it covers the behavior): PageScriptGlobalsTests.NET_only_observes_a_page_that_deleted_window_Node and NET_only_lists_the_text_of_a_label_whose_control_has_no_box, LocatorEngineVisibleQueriesTests.NET_only_a_text_query_resolves_a_shown_label_over_the_zero_sized_control_inside_it, LocatorEnginePerformContractTests.NET_only_sends_the_action_to_a_hidden_node_and_leaves_its_actionability_to_the_engine. No new symbols in src/, except the private BoxedFirst helper (.NET-only: this tree lists box-less nodes, upstream's does not).

Closes #1079
Closes #1080
Closes #1081

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 85e973c and c652ff5.

Files selected for processing: 7
  • COMPATIBILITY.md
  • src/E2E/Engine/PageScript.cs
  • src/E2E/Locator/LocatorEngine.cs
  • src/E2E/Locator/Screen.cs
  • tests/E2E.Tests/LocatorEngine/LocatorEnginePerformContractTests.cs
  • tests/E2E.Tests/LocatorEngine/LocatorEngineVisibleQueriesTests.cs
  • tests/E2E.Tests/PageScriptGlobals/PageScriptGlobalsTests.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK
@kblok

kblok commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kblok

kblok commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kblok
kblok merged commit 332c5a4 into main Nov 5, 2026
4 checks passed
@kblok
kblok deleted the issue-1079-1081-page-script branch November 5, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant