- From: <bugzilla@jessica.w3.org>
- Date: Fri, 03 Oct 2014 16:23:42 +0000
- To: public-browser-tools-testing@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26962 Bug ID: 26962 Summary: Define what response should be sent when an alert is open Product: Browser Test/Tools WG Version: unspecified Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: WebDriver Assignee: public-browser-tools-testing@w3.org Reporter: ato@mozilla.com QA Contact: public-browser-tools-testing@w3.org CC: mike@w3.org Section 5.2.1 says that “If any modal dialog box, such as those opened by on window.onbeforeunload or window.alert, is opened at any point in the page load, a response MUST be sent.” Because we need to do this as a precondition for almost all commands I suggest we make it a definition that each command's algorithm can refer to. The language also need to be cleaned up, and I suggest something along the lines of: - Define a global state that signifies whether an alert dialogue is open. - Create a definition of how what steps to take when the previous state is true, including the steps to populate the response with the correct status. - Add this as a precondition to all commands where we need to check for this. I imagine we can use a language like this for the POST /session/{session_id}/url command: “All <a>alert dialogs</a> created during <code><a>beforeunload</a></code> are subject to <a>unexpected alert handling</a>.” And a definition of alert dialogs: “<code><a>Window.alert</a></code>, <code><a>Window.confirm</a></code>, and <code><a>Window.prompt</a></code> are considered <dfn>alert dialogs</dfn>.” Then some text on how to handle the dialogs: “<a>Alert dialogs</a> block document script execution and WebDriver behaves the same way. When <a>alert dialogs</a> are created commands are free to choose if they should affect their response. The following steps may be run when a command requests <dfn>unexpected alert handling</dfn> on <var>request</var>: <ul> <li>If the <a>current alert</a> is defined: <ul> <li>Let <var>response</var>'s status be <a>unexpected alert open</a>. <li>Return response and abort the remaining steps. </ul> <li>Otherwise, return. </ul>” Then the definition of “current alert”: “The remote end must keep a global state <dfn>current alert</dfn> that is an initially left undefined <a>alert</a>. When any of the <a>alert dialogs</a> appear, this state must be updated with a reference to that alert.” And then we need a definition of an “alert” struct which we can use in the algorithm for interacting with the alert. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Friday, 3 October 2014 16:23:44 UTC