webdriver
webdriver copied to clipboard
fix regression in definition of beforeunload prompts caused by #1040 / #1518
The definition of what happens to a prompt created from a beforeunload event unintentionally changed from being implicitly dismissed from explicit navigation to implicit navigation.
the link used to go to "Go" but this was renamed in #1040 leaving a dead link.
This link was "fixed" in #1518 but instead of fixing the link to how it was (by linking to the new "Navigate To" which was renamed earlier) it linked to the default definition of navigate which is vastly different and covers all navigation implicit or explicit.
fixes #1294
If there's a desire to change the way the protocol works with
beforeUnloadprompts, the first question is what existing implementations do.
Chrome - allows the user to handle them Previous versions of firefox (not sure if this is firefox or a geckodriver change) allowed the user to handle them Firefox/geckodriver latest releases - does not allow the user to handle them.
If current implementations always follow the current spec it seems likely that unilateral change in the spec will break tests.
See above - this is not the case.
If there are various behaviours there might be more flexibility to change things without breaking users.
Potentially the issue at hand is that the link to navigate includes all forms of navigationby linking to dfn-navigation (even ones performed by click on a WebElement rather than just explicit ones (forward / back / navigate to) by linking to navigation (section 10)?
Potentially the issue at hand is that the link to navigate includes all forms of navigationby linking to dfn-navigation (even ones performed by click on a WebElement rather than just explicit ones (forward / back / navigate to) by linking to navigation (section 10)?
which could as I understand it have been introduced in 321fff4e12d80a745828f7c711fdc18932cca244 because prior to that change there was no definition of navigation and thus IIUC the link would have taken you to the section header?
incorrect link in the above. It did indeed used to link not to dfn-navigation but go (which was explicit navigation triggered by webdriver and not by implicit navigation caused by a click on an element.
33c1f38f5353ffd3033179bd698b2adf84f41e86
Go was what Navigate To was called - so I think this is the actual issue :)
so this was as intended prior to #1040
@jgraham have you had a chance to look and (in)validate my latest analysis here?
Given that Mozilla Firefox / geckodriver is now implementing this "as written" and differently to other browsers based seems pretty scary to me, when as written is caused by an innocent accident.
I realise that #1518 changed Go (navigate to) to navigate in multiple places so this is a wider issue than just here.