You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: 1.63 regression - page.frame(...).locator(...).highlight highlights elements in the wrong frame #42850
Confirmed on main, reproduced with the example from the report — click() lands on the correct button inside the frame, but the highlight overlay shows up on the button in the main document.
This looks like a regression from #42277. FrameDispatcher.highlight now hands just the selector to the page-level HighlightController, and _resolve() re-resolves every entry starting from page.mainFrame(), so the frame the locator belongs to gets dropped along the way. css=button then matches the bar button in the main document.
Working on a PR — the plan is to thread the originating frame through the highlight entry and resolve relative to it, which restores the old per-frame frame.addHighlight() behavior.
Activity
ashrafiucse commentedon Sep 22, 2026
Confirmed on main, reproduced with the example from the report —
click()lands on the correct button inside the frame, but the highlight overlay shows up on the button in the main document.This looks like a regression from #42277.
FrameDispatcher.highlightnow hands just the selector to the page-levelHighlightController, and_resolve()re-resolves every entry starting frompage.mainFrame(), so the frame the locator belongs to gets dropped along the way.css=buttonthen matches thebarbutton in the main document.Working on a PR — the plan is to thread the originating frame through the highlight entry and resolve relative to it, which restores the old per-frame
frame.addHighlight()behavior.