Open joshlandin opened 6 years ago
Duplicate of https://github.com/w3c/webdriver/issues/1166?
No, it's not a duplicate.
Currently the spec only covers handling of alerts before the actual command is getting performed. If like in this case a navigation request causes an alert to be opened, we indeed would have to define an appropriate handling of alerts in waiting-for-the-navigation-to-complete.
Using: Selenium 3.10.0, Gecko 0.19.1-64bit, Firefox 58.0.2 (Native Events disabled)
I struggled with whether this issue is most relevant to Selenium, Geckodriver, WebDriver, or Marionette/Firefox, but ultimately settled here.
Today, clicking a link that results in browser navigation is a blocking operation. I realize that we may not always get this right, but in most cases, this is true. For example:
However when a confirmation dialog determining whether navigation is triggered is added to the link, the click()/accept() no longer block on the navigation:
This request is to make link navigation a synchronous event (from a testing perspective), even when it results from a click() indirectly via JavaScript. Hopefully the approach would address the majority of cases, even if it cannot solve all.