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
Actions report same-document (SPA) navigations like page loads, but not reloads #3394
After an input tool or evaluate_script, the response adds Page navigated to <url>. whenever the page URL differs from before the action. The URL is all that decides it, so:
A same-document navigation (history.pushState, a fragment link) gets the same line as a full page load
A navigation that loads a new document at the same URL gets no line, like location.reload() or a form POST that redirects back to the same page
What an agent needs from that line is whether the document was replaced, as that decides whether page state, globals from earlier evaluate_script calls and the console survived. I had an agent take that line for a reload in a single-page app and report a setting lost on reload, when only the route had changed.
PageCollector has told the two apart since #2676, so list_console_messages keeps its history across same-document navigations.
Reproduction
navigate_page to https://example.com
evaluate_script with () => history.pushState({}, '', '/other'). The response ends with Page navigated to https://example.com/other. although nothing loaded (performance.timeOrigin stays the same)
evaluate_script with () => { setTimeout(() => location.reload()); }. No navigation line, although the page reloaded (performance.timeOrigin changed)
Clicks behave the same. A fragment link reports like step 2.
Expectation
The line tells a same-document navigation apart from a new document, and a new document gets reported even when the URL stays the same.
Activity
fix: report page loads that keep the URL (ChromeDevTools#3395)
fix: distinguish same-document navigations from page loads (ChromeDev…