Skip to content

Element click doesn't wait for navigation in case of form submissions #1166

Open
@whimboo

Description

@whimboo

Here the relevant part of the spec:

14.1 Element Click

  1. Perform implementation-defined steps to allow any navigations triggered by the click to start.

  2. Try to wait for navigation to complete.

The problem hereby is that eg. for clicking a submit button it is not guaranteed that the click will immediately cause a page navigation. In the case of a registered click event handler, the form submission can be delayed (or completely aborted by using preventDefault). In case of a delay, the click handler might trigger the form submission directly via form.submit().

Our page load strategy for click should be clarified in how to handle situations like those, which could happen a lot in the web. Especially when frameworks like Angular, or React/Redux are in use.

See mozilla/geckodriver#1026 for an example.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions