Closed
Bug 1769514
Opened 2 years ago
Closed 10 months ago
Add support for handling pushstate/popstate to "browsingContext.navigate"
Categories
(Remote Protocol :: WebDriver BiDi, task)
Remote Protocol
WebDriver BiDi
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1861655
People
(Reporter: whimboo, Unassigned)
References
(Blocks 1 open bug)
Details
Single page applications will use pushstate and popstate to navigate through different pages of the website. We should have coverage for these scenarios.
The WebProgress listener supports the LOCATION_CHANGE_SAME_DOCUMENT
flag for onLocationChange
notifications, which can be used here.
Reporter | ||
Updated•2 years ago
|
Priority: -- → P3
Reporter | ||
Comment 1•2 years ago
|
||
To test this feature the wdspec tests should be able to evaluate code in the given browsing context. This work is done on bug 1742979.
Depends on: 1742979
Reporter | ||
Comment 3•11 months ago
|
||
Resetting priority because this missing feature blocks a P1 Puppeteer test. See more details on bug 1861719.
Here a wdspec test example which fails because a new navigation id is created:
async def test_navigate_history_pushstate(bidi_session, inline, new_tab, wait_for_event):
NAVIGATION_STARTED_EVENT = "browsingContext.navigationStarted"
await bidi_session.session.subscribe(events=[NAVIGATION_STARTED_EVENT])
on_entry = wait_for_event(NAVIGATION_STARTED_EVENT)
url = inline("""
<script>
window.addEventListener('DOMContentLoaded', () => {
history.pushState({}, '', '#1');
});
</script>""")
result = await bidi_session.browsing_context.navigate(
context=new_tab["context"], url=url, wait="complete"
)
event = await on_entry
assert event["navigation"] == result["navigation"]
Priority: P3 → --
Comment 4•11 months ago
|
||
I think this might also be addressed by Bug 1861655, but it's an interesting scenario.
Reporter | ||
Updated•10 months ago
|
Updated•10 months ago
|
Whiteboard: [webdriver:backlog]
You need to log in
before you can comment on or make changes to this bug.
Description
•