-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should navigables created and navigated via WebDriver BiDi commands be counted as script-closable? #859
Comments
From my point of view we should stay as close as possible to the experience of a normal user. That means that we should not change the default behavior as given by the web browser. It would add scenarios that cannot be tested - or would require workarounds in the test but then the test might not test the user facing behavior anymore. I vote to keep the current behavior. |
but the current behavior is not what the normal user would experience because new tabs do not open about:blank in the first place for normal users. Only window.open has this behavior. |
I'm not sure I understand in which circumstances the history size can be 1, but if I create a new tab and navigate to In any case, |
The size is 1, if the initial URL is about:blank https://html.spec.whatwg.org/#the-navigation-must-be-a-replace |
But what's the case where you can:
In the case where you run Anyway if the question is "if you |
@jgraham you are seeing this behavior because your default URL of a new tab is |
In fact, in Firefox, if I switch the new tab page to If In any case I don't really understand what use case the HTML spec is serving here (surely allowing pages to close themselves iff they are the first page loaded in a tab where the new tab page was set to |
Currently, the spec says that after a navigable is created and navigated to a URL, the page can close the navigable by calling window.close because the history size is 1. (https://html.spec.whatwg.org/#script-closable, https://html.spec.whatwg.org/#the-navigation-must-be-a-replace).
Should we keep this behavior or should we ensure that pages cannot interfere with the automation (more closely following how the user opening a tab using the browser ui would handled handled)? I suspect we want to keep the current behavior but filing an issue in case there are different opinions.
The text was updated successfully, but these errors were encountered: