Skip to content

Back/Forward should traverse history via the top-level browsing context #1801

@whimboo

Description

@whimboo

In step 1 of the Back and Forward commands the top-level browsing context is checked, but in step 3 the traversal happens in the current browsing context. That means the navigation will fail if the currently selected frame got destroyed.

https://w3c.github.io/webdriver/#back

Also it should be made clear in step 4 which browsing context needs to be observed. Situations to take into account:

  1. The browsing context has already been closed
  2. The browsing context is going to be destroyed
  3. The browsing context is going to be moved into bfcache (supported by Firefox and Safari for now)

For the situation 3) there will be a pagehide event but no pageshow until another navigation brings the page / frame back out of the bfcache. It means current implementations would hang.

CC'ing @AutomatedTester and @jgraham for further feedback. Shall we take bfcache into account for the WebDriver spec? If yes it might warrant a new issue / discussion for sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions