Open Bug 1611857 Opened 5 years ago Updated 2 years ago

WebDriver:Navigate doesn't wait for page loaded if new URL has the same hash

Categories

(Remote Protocol :: Marionette, defect, P3)

Version 3
defect

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

(Blocks 1 open bug)

Details

Reported as: https://github.com/mozilla/geckodriver/issues/1678

A simple Marionette testcase shows that behavior:

    def test_testcase_users(self):
        self.marionette.navigate("https://example.com/#test")
        self.marionette.navigate("https://google.com/#test")
        self.assertEqual(self.marionette.get_url(), "https://google.com/#test")

While we are waiting for the page load events for the first invocation, there is no event check at all for the second one:

1580162822981	Marionette	DEBUG	3 -> [0,2,"WebDriver:Navigate",{"url":"https://example.com/#test"}]
1580162822985	Marionette	TRACE	[6] Received DOM event beforeunload for about:blank
1580162823361	Marionette	TRACE	[6] Received DOM event pagehide for about:blank
1580162823370	Marionette	TRACE	[6] Received DOM event DOMContentLoaded for https://example.com/#test
1580162823537	Marionette	TRACE	[6] Received DOM event pageshow for https://example.com/#test
1580162823538	Marionette	DEBUG	3 <- [1,2,null,{"value":null}]
1580162823541	Marionette	DEBUG	3 -> [0,3,"WebDriver:Navigate",{"url":"https://google.com/#test"}]
1580162823561	Marionette	DEBUG	3 <- [1,3,null,{"value":null}]

I would like to see that fixed when continue working on bug 1612831.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: P3 → P1

Actually for back and forward this is too hard to do right now. We should wait until all the navigation happens in the parent process.

Assignee: hskupin → nobody
Status: ASSIGNED → NEW
Depends on: 1612831
Priority: P1 → P3
Severity: normal → S3
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.