Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 24791: Part 2: Update references to Document instead of DOM

  • Loading branch information...
commit da4d3abea4623643bfc2b7f3946f14903050b543 1 parent b0aea90
@AutomatedTester authored
View
4 02_commands.html
@@ -81,7 +81,7 @@
</tr>
<tr>
<td><dfn id="status-invalid-element-state">invalid element state</dfn></td>
- <td>An element command could not be completed because the element is in an invalid state (e.g. attempting to click an element that is no longer attached to the DOM).</td>
+ <td>An element command could not be completed because the element is in an invalid state (e.g. attempting to click an element that is no longer attached to the Document).</td>
</tr>
<tr>
<td><dfn id="status-invalid-selector">invalid selector</dfn></td>
@@ -121,7 +121,7 @@
</tr>
<tr>
<td><dfn id="status-stale-element-reference">stale element reference</dfn></td>
- <td>An element command failed because the referenced element is no longer attached to the DOM.</td>
+ <td>An element command failed because the referenced element is no longer attached to the Document.</td>
</tr>
<tr>
<td><dfn id="status-success">success</dfn></td>
View
4 07_switching.html
@@ -59,9 +59,9 @@
<p>The "switchToFrame" command is used to select which frame within a window MUST be used as the context for handling future commands. All frame switching is taken from the current context from which commands are currently being handled. The "<code>id</code>" parameter can be a number or a <a>WebElement</a>. WebDriver implementations MUST determine which frame to select using the following algorithm:
<ol>
- <li>If the "id" is a number the current context is set to the equivalent of the JS expression "window.frames[n]" where "n" is the number and "window" is the DOM window represented by the current context.</li>
+ <li>If the "id" is a number the current context is set to the equivalent of the JS expression "window.frames[n]" where "n" is the number and "window" is the Document window represented by the current context.</li>
<li>If the "id" is null, the current context is set to the default context.</li>
- <li>If the "id" represents a <a>WebElement</a>, and the corresponding DOM element represents a FRAME or an IFRAME, and the <a>WebElement</a> is part of the current context, the "window" property of that DOM element becomes the current context.</li>
+ <li>If the "id" represents a <a>WebElement</a>, and the corresponding Document element represents a FRAME or an IFRAME, and the <a>WebElement</a> is part of the current context, the "window" property of that Document element becomes the current context.</li>
</ol>
<p>In all cases if no match is made a "<code><a href="#status-no-such-frame">no such frame</a></code>" status code MUST be returned.</p>
View
12 09_elements.html
@@ -6,12 +6,12 @@
<a href="http://www.w3.org/TR/2012/WD-dom-20120105/#interface-element">Element</a> as defined in the
[[!DOM4]] specification. Because the WebDriver API is designed to allow users to interact with apps as if
they were actual users, the capabilities offered by the
- <code>WebElement</code> interface are somewhat different from those offered by the DOM Element interface.</p>
+ <code>WebElement</code> interface are somewhat different from those offered by the Document Element interface.</p>
<p>Each WebElement instance must have an ID, which is distinct from the value
- of the DOM Element's "id" property. The ID for every WebElement representing the same
- underlying DOM Element MUST be the same. The IDs used to refer to different
- underlying DOM Elements MUST be unique within the session over the entire duration of the session.</p>
+ of the Document Element's "id" property. The ID for every WebElement representing the same
+ underlying Document Element MUST be the same. The IDs used to refer to different
+ underlying Document Elements MUST be unique within the session over the entire duration of the session.</p>
<div class="note">
<p>This requirement around WebElement IDs allows for efficient equality
@@ -78,7 +78,7 @@
valid for finding a single element or groups of elements. In the case of
finding a single WebElement, this MUST be functionally identical to a call
to "<a href="http://www.w3.org/TR/2012/WD-dom-20120105/#dom-document-getelementbyid">document.getElementById()</a>"
- from the Web DOM Core specification ([[!DOM4]]). When finding multiple
+ from the [[!DOM4]]. When finding multiple
elements, this is equivalent to an CSS query of "<code>#value</code>" where "value" is the ID being searched for with all "'" characters being properly escaped..</p>
</section>
<section>
@@ -120,7 +120,7 @@
<section>
<h2>XPath</h2>
<p>Strategy name: xpath</p>
- <p>All WebDriver implementations MUST support finding elements by XPath 1.0 [[!XPATH]] with the <a href="http://dev.w3.org/html5/spec/Overview.html#interactions-with-xpath-and-xslt">edits from section 3.3</a> of the [[!HTML51]] specification made. If no native support is present in the browser, a pure JS implementation MAY be used. When called, the returned values MUST be equivalent of calling "<a href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-evaluate">evaluate</a>" function from the DOM Level 3 XPath spec [[DOM-LEVEL-3-XPATH]] with the result type set to "<a href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-ORDERED-NODE-SNAPSHOT-TYPE">ORDERED_NODE_SNAPSHOT_TYPE</a> (7).</p>
+ <p>All WebDriver implementations MUST support finding elements by XPath 1.0 [[!XPATH]] with the <a href="http://dev.w3.org/html5/spec/Overview.html#interactions-with-xpath-and-xslt">edits from section 3.3</a> of the [[!HTML51]] specification made. If no native support is present in the browser, a pure JS implementation MAY be used. When called, the returned values MUST be equivalent of calling "<a href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-evaluate">evaluate</a>" function from [[DOM-LEVEL-3-XPATH]] with the result type set to "<a href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-ORDERED-NODE-SNAPSHOT-TYPE">ORDERED_NODE_SNAPSHOT_TYPE</a> (7).</p>
</section>
</section>
</section>
View
12 10_element_state.html
@@ -55,16 +55,16 @@ <h2 id='determining-if-displayed'>Determining if an element is displayed</h2>
<p>The remote end MUST determine whether a <code>WebElement</code> is selected using the following algorithm:
<ol>
<li id="is_selectable">If the item is not "<code title="selectable">selectable</code>", the WebElement is not selected. A <dfn id="selectable" title="selectable">selectable</dfn> element is either an OPTION element or an INPUT element of type "<a href="http://www.w3.org/TR/html5/forms.html#checkbox-state-(type=checkbox)">checkbox</a>" or "<a href="http://www.w3.org/TR/html5/forms.html#radio-button-state-(type=radio)">radio</a>".</li>
- <li>If the DOM node represented by the WebElement is an OPTION element, the "<a href="http://www.w3.org/TR/html5/forms.html#concept-option-selectedness">selectedness</a>" of the element, as defined in [[!HTML51]] determines whether the element is selected.</li>
- <li>Otherwise, the value of the DOM node's "<a href="http://www.w3.org/TR/html5/forms.html#attr-input-checked">checked</a>" property determines whether the element is selected. This MUST reflect the element's "<a href="http://www.w3.org/TR/html5/forms.html#concept-fe-checked">checkedness</a>" as defined in [[!HTML51]].</li>
+ <li>If the Document node represented by the WebElement is an OPTION element, the "<a href="http://www.w3.org/TR/html5/forms.html#concept-option-selectedness">selectedness</a>" of the element, as defined in [[!HTML51]] determines whether the element is selected.</li>
+ <li>Otherwise, the value of the Document node's "<a href="http://www.w3.org/TR/html5/forms.html#attr-input-checked">checked</a>" property determines whether the element is selected. This MUST reflect the element's "<a href="http://www.w3.org/TR/html5/forms.html#concept-fe-checked">checkedness</a>" as defined in [[!HTML51]].</li>
</ol>
<dl class='idl' title='partial interface WebElement'>
<dt>boolean isSelected()</dt>
<dd><p>The remote end MUST determine whether a <code>WebElement</code> is selected using the following algorithm:
<ol>
<li id="is_selectable">If the item is not "<code title="selectable">selectable</code>", the WebElement is not selected. A <dfn id="selectable" title="selectable">selectable</dfn> element is either an OPTION element or an INPUT element of type "<a href="http://www.w3.org/TR/html5/forms.html#checkbox-state-(type=checkbox)">checkbox</a>" or "<a href="http://www.w3.org/TR/html5/forms.html#radio-button-state-(type=radio)">radio</a>".</li>
- <li>If the DOM node represented by the WebElement is an OPTION element, the "<a href="http://www.w3.org/TR/html5/forms.html#concept-option-selectedness">selectedness</a>" of the element, as defined in [[!HTML51]] determines whether the element is selected.</li>
- <li>Otherwise, the value of the DOM node's "<a href="http://www.w3.org/TR/html5/forms.html#attr-input-checked">checked</a>" property determines whether the element is selected. This MUST reflect the element's "<a href="http://www.w3.org/TR/html5/forms.html#concept-fe-checked">checkedness</a>" as defined in [[!HTML51]].</li>
+ <li>If the Document node represented by the WebElement is an OPTION element, the "<a href="http://www.w3.org/TR/html5/forms.html#concept-option-selectedness">selectedness</a>" of the element, as defined in [[!HTML51]] determines whether the element is selected.</li>
+ <li>Otherwise, the value of the Document node's "<a href="http://www.w3.org/TR/html5/forms.html#attr-input-checked">checked</a>" property determines whether the element is selected. This MUST reflect the element's "<a href="http://www.w3.org/TR/html5/forms.html#concept-fe-checked">checkedness</a>" as defined in [[!HTML51]].</li>
</ol>
<dl class='parameters'>
<dt>DOMString id</dt>
@@ -78,7 +78,7 @@ <h2 id='determining-if-displayed'>Determining if an element is displayed</h2>
<section>
<h2 name="attributes-and-properties">Reading Attributes and Properties</h2>
- <p>Although the [[!HTML51]] spec is very clear about the difference between the properties and attributes of a DOM element, users are frequently confused between the two. Because of this, the WebDriver API offers a single command ("getElementAttribute") which covers the case of returning either of the value of a DOM element's property or attribute. If a user wishes to refer specifically to an attribute or a property, they should evaluate Javascript in order to be unambiguous.</p>
+ <p>Although the [[!HTML51]] spec is very clear about the difference between the properties and attributes of a Document element, users are frequently confused between the two. Because of this, the WebDriver API offers a single command ("getElementAttribute") which covers the case of returning either of the value of a Document element's property or attribute. If a user wishes to refer specifically to an attribute or a property, they should evaluate Javascript in order to be unambiguous.</p>
<dl class='idl' title='interface WebElement'>
<dt>DOMString getElementAttribute()</dt>
<dd>
@@ -181,7 +181,7 @@ <h2 name="attributes-and-properties">Reading Attributes and Properties</h2>
<dd>Horizontal whitespace characters are defined by the ECMAScript regular expression <code>[\x20\t\u2028\u2029]</code>.</dd>
</dl>
-<p>The expected return value is roughly what a text-only browser would display. This means that on browsers that support the Shadow DOM, this algorithm MUST operate on the section of the rendered DOM underneath the DOM node represented by this WebElement. The algorithm for determining this text is as follows:</p>
+<p>The expected return value is roughly what a text-only browser would display. The algorithm for determining this text is as follows:</p>
<p>Let <code>lines</code> equal an empty array. Then:
<ol>
View
8 11_ecmascript.html
@@ -33,8 +33,8 @@
<li>a dictionary, then recursively apply this algorithm to each value in <code>args[index]</code> and assign the result to <code>args[index]</code>.</li>
<li>a <a href="#elements">WebElement</a>, then:
<ol>
- <li>If the element's ID does not represent a DOMElement, or it represents a DOMElement that is no longer attached to the document's tree, then the WebDriver implementation MUST immediately abort the command and return a <code title="stale-element-reference"><a href="#status-stale-element-reference">stale element reference</a></code> error.</li>
- <li>Otherwise, let <code>args[index]</code> be the underlying DOMElement.</li>
+ <li>If the element's ID does not represent a Document Element, or it represents a Document Element that is no longer attached to the document's tree, then the WebDriver implementation MUST immediately abort the command and return a <code title="stale-element-reference"><a href="#status-stale-element-reference">stale element reference</a></code> error.</li>
+ <li>Otherwise, let <code>args[index]</code> be the underlying Document Element.</li>
</ol>
</li>
<li>Otherwise WebDriver implementations MAY throw an <code><a href="#status-unknown-error">unknown error</a></code> indicating the index of the unhandled parameter but SHOULD attempt to convert the value into a dictionary.</li>
@@ -75,7 +75,7 @@
<ol>
<li><code>undefined</code> or <code>null</code>, return <code> null</code>.
<li>a number, boolean, or DOMString, return <code>result</code>.
- <li>a DOMElement, then return the corresponding WebElement for that DOMElement.
+ <li>a Document Element, then return the corresponding WebElement for that Document Element.
<!-- Should there be a recursion limit? -->
<li>a <code>Sequence &lt;Node&gt; nodes</code>, then return the result of recursively applying this algorithm to <code>result</code>.
<!-- Should there be a limit? -->
@@ -135,7 +135,7 @@
<ol>
<li><code>undefined</code> or <code>null</code>, return <code> null</code>.</li>
<li>a number, boolean, or DOMString, return <code>result</code>.</li>
- <li>a DOMElement, then return the corresponding WebElement for that DOMElement.</li>
+ <li>a Document Element, then return the corresponding WebElement for that Document Element.</li>
<!-- Should there be a recursion limit? -->
<li>a <code>Sequence &lt;Node> Nodes</code>, then return the result by recursively applying this algorithm to <code>result</code>. WebDriver implementations SHOULD limit the recursion depth.</li>
<!-- Should there be a limit? -->
View
8 16_snapshots.html
@@ -29,15 +29,15 @@
<p>If this capability is supported, local end MUST add the <code>TakesScreenshot</code> interface to the <code>WebDriver</code> interface.</p>
- <p>This command will take a screenshot of the current window. Implementations of the remote end SHOULD capture the entire DOM, even if this would require a user to scroll the browser window. That is, the returned PNG SHOULD have the same width and height as returned by a call to <code>getSize</code> of the BODY element and MUST contain all visible content on the page, and this SHOULD be done without resizing the browser window. If the remote end is unable to capture the entire DOM, then the part of the DOM currently displayed in UI of the browser MUST be captured without additional chrome such as scrollbars and browser chrome.</p>
+ <p>This command will take a screenshot of the current window. Implementations of the remote end SHOULD capture the entire Document, even if this would require a user to scroll the browser window. That is, the returned PNG SHOULD have the same width and height as returned by a call to <code>getSize</code> of the BODY element and MUST contain all visible content on the page, and this SHOULD be done without resizing the browser window. If the remote end is unable to capture the entire Document, then the part of the Document currently displayed in UI of the browser MUST be captured without additional chrome such as scrollbars and browser chrome.</p>
<div class="note">
- <p>One way to think of capturing the entire DOM is that the user has an infinitely large monitor and has resized the window to allow all content to be visible. One of those monitors would be very cool.</p>
+ <p>One way to think of capturing the entire Document is that the user has an infinitely large monitor and has resized the window to allow all content to be visible. One of those monitors would be very cool.</p>
</div>
<p>Nested frames MUST be sized as if the user has resized the window to the dimensions of the PNG being returned. This often means that not all potentially visible content within the nested frames is captured.</p>
- <p>Remote ends MUST NOT attempt to track changes in window size as the screenshot is being taken. In particular this means that in the case of a page that makes use of "infinite scrolling" (where an AJAX call is used to populate additional content as the user scrolls down) or in some other way resizes content as the window size is changed only the content that was originally contained in the DOM when the command is executed will be captured.</p>
+ <p>Remote ends MUST NOT attempt to track changes in window size as the screenshot is being taken. In particular this means that in the case of a page that makes use of "infinite scrolling" (where an AJAX call is used to populate additional content as the user scrolls down) or in some other way resizes content as the window size is changed only the content that was originally contained in the Document when the command is executed will be captured.</p>
</section>
<section>
<h2>Element</h2>
@@ -47,7 +47,7 @@
</table>
<p>If this capability is supported, local end MUST add the <code>TakesScreenshot</code> interface to the <code>WebElement</code> interface.</p>
- <p>Remote ends SHOULD take a screenshot of the area bounded by the clientBoundingRect of the DOM element represented by the <code>WebElement</code>, returning it as a Base64 encoded, lossless PNG. Local ends MUST make the PNG available directly to the user as at least one of a binary blob or a file. If the remote end cannot capture the entire clientBoundingRect, they MUST scroll as much of the element into the current browser viewport as possible and capture the maximum visible area without additional browser chrome.</p>
+ <p>Remote ends SHOULD take a screenshot of the area bounded by the clientBoundingRect of the Document element represented by the <code>WebElement</code>, returning it as a Base64 encoded, lossless PNG. Local ends MUST make the PNG available directly to the user as at least one of a binary blob or a file. If the remote end cannot capture the entire clientBoundingRect, they MUST scroll as much of the element into the current browser viewport as possible and capture the maximum visible area without additional browser chrome.</p>
<p>If the <code>WebElement</code> represents a FRAME or IFRAME element, this is equivalent of taking a screenshot of the frame's BODY element.</p>
</section>
</section>
View
8 17_non_html_content.html
@@ -1,14 +1,14 @@
<section>
<h2>Handling non-HTML Content</h2>
<p>Non-HTML content MUST be treated in the same manner as HTML if the Non-HTML if the browser
- creates a DOM object for the content of the document. If a DOM Object is not created then
+ creates a Document object for the content of the document. If a Document Object is not created then
how it handled SHOULD be non-normative</p>
<section>
<h2>XML</h2>
<p>This section describes XML documents as described in [[XML10]]. For XHTML documents the remote end should treat them as HTML documents
and not have the caveats, below, applied.</p>
- <p>Since Browsers create a DOM object for XML pages it is expected that we can interogate
+ <p>Since Browsers create a Document object for XML pages it is expected that we can interogate
them as a normal HTML document however the following differences should be noted:</p>
<ul>
<li>Visibility Checks MAY be skipped since XML nodes can not be hidden and <code>isDisplayed</code> MUST return true<li>
@@ -24,8 +24,8 @@
<section>
<h2>SVG</h2>
<p>This section described SVG documents in a browser as described by [[SVG2]].
- Since browsers create a DOM tree for SVG documents it is expected that WebDriver
- can interrogate the DOM as a normal HTML document.
+ Since browsers create a Document tree for SVG documents it is expected that WebDriver
+ can interrogate the Document as a normal HTML document.
</p>
</section>
View
84 webdriver-spec.html
@@ -234,7 +234,7 @@
</tr>
<tr>
<td><dfn id="status-invalid-element-state">invalid element state</dfn></td>
- <td>An element command could not be completed because the element is in an invalid state (e.g. attempting to click an element that is no longer attached to the DOM).</td>
+ <td>An element command could not be completed because the element is in an invalid state (e.g. attempting to click an element that is no longer attached to the Document).</td>
</tr>
<tr>
<td><dfn id="status-invalid-selector">invalid selector</dfn></td>
@@ -274,7 +274,7 @@
</tr>
<tr>
<td><dfn id="status-stale-element-reference">stale element reference</dfn></td>
- <td>An element command failed because the referenced element is no longer attached to the DOM.</td>
+ <td>An element command failed because the referenced element is no longer attached to the Document.</td>
</tr>
<tr>
<td><dfn id="status-success">success</dfn></td>
@@ -622,8 +622,8 @@ <h2 id="page-load-strategies">Page Load Strategies</h2>
</tr>
</table>
<p>WebDriver implementations MUST allow the users to be able to get the
- current URL. In the case of a <a href='http://www.w3.org/TR/html5/browsers.html#nested-browsing-context'>Nested Browsing Context</a> WebDriver should return the [[HTML5]] <a href='http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context'>top level browsering context</a>.
- The returned value should be the equivalent to returning <code>document.location.href</code> for the [[HTML5]] <a href='http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context'>top level browsering context</a>.
+ current URL. In the case of a <a href='http://www.w3.org/TR/html5/browsers.html#nested-browsing-context'>Nested Browsing Context</a> WebDriver should return the [[HTML51]] <a href='http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context'>top level browsering context</a>.
+ The returned value should be the equivalent to returning <code>document.location.href</code> for the [[HTML51]] <a href='http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context'>top level browsering context</a>.
<p>If the window currently receiving commands is no longer open a <code><a href="#no-such-window">no such window</a></code> MUST be raised.
</dd>
@@ -642,7 +642,7 @@ <h2 id="page-load-strategies">Page Load Strategies</h2>
<td></td>
</tr>
</table>
- <p>The "goBack" command is equivalent to a user hitting the "back" button in their browser, and MUST behave as a <a href="http://www.w3.org/TR/html/browsers.html#traverse-the-history-by-a-delta">traversal of the browser history by a delta of -1</a> (as defined in [[!HTML5]]). If a user calls "<code>goBack</code>" when there are no further pages in the browser's history stack, then this call MUST be a no-op.
+ <p>The "goBack" command is equivalent to a user hitting the "back" button in their browser, and MUST behave as a <a href="http://www.w3.org/TR/html/browsers.html#traverse-the-history-by-a-delta">traversal of the browser history by a delta of -1</a> (as defined in [[!HTML51]]). If a user calls "<code>goBack</code>" when there are no further pages in the browser's history stack, then this call MUST be a no-op.
</p>
<p> If the page takes too long <a href="#timeouts">as specified by the timeouts</a> a <code><a href="#status-timeout">timeout</a></code> MUST be raised. If the window currently receiving commands is no longer open a <code><a href="#no-such-window">no such window</a></code> MUST be raised.
</dd>
@@ -660,7 +660,7 @@ <h2 id="page-load-strategies">Page Load Strategies</h2>
<td></td>
</tr>
</table>
- <p>The "goForward" command is equivalent to a user hitting the "forward" button in their browser, and MUST behave as a <a href="http://www.w3.org/TR/html/browsers.html#traverse-the-history-by-a-delta">traversal of the browser history by a delta of +1</a> (as defined in [[!HTML5]]). If a user calls "<code>goForward</code>" when there are no further pages in the browser's history stack, then this call MUST be a no-op.
+ <p>The "goForward" command is equivalent to a user hitting the "forward" button in their browser, and MUST behave as a <a href="http://www.w3.org/TR/html/browsers.html#traverse-the-history-by-a-delta">traversal of the browser history by a delta of +1</a> (as defined in [[!HTML51]]). If a user calls "<code>goForward</code>" when there are no further pages in the browser's history stack, then this call MUST be a no-op.
<p> If the page takes too long <a href="#timeouts">as specified by the timeouts</a> a <code><a href="#status-timeout">timeout</a></code> MUST be raised. If the window currently receiving commands is no longer open a <code><a href="#no-such-window">no such window</a></code> MUST be raised
</dd>
@@ -716,7 +716,7 @@ <h2 id="page-load-strategies">Page Load Strategies</h2>
<section>
<h2>Defining "window" and "frame"</h2>
- <p>Within this specification, a window equates to [[!HTML5]]'s <a href="http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context">top level browsing context</a>. Put another way, within this spec browser tabs are counted as separate windows.</p>
+ <p>Within this specification, a window equates to [[!HTML51]]'s <a href="http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context">top level browsing context</a>. Put another way, within this spec browser tabs are counted as separate windows.</p>
<p><strong>TODO: define "frame"</strong></p>
</section>
@@ -816,7 +816,7 @@ <h2 name="iterating-over-windows">Iterating Over Windows</h2>
<section>
<h2>Default Content</h2>
- <p>WebDriver's <dfn id="default-content">default content</dfn> is [[!HTML5]]'s <a href="http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context">top level browsing context</a> for the window that is currently receiving WebDriver commands.</p>
+ <p>WebDriver's <dfn id="default-content">default content</dfn> is [[!HTML51]]'s <a href="http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context">top level browsing context</a> for the window that is currently receiving WebDriver commands.</p>
<p>When a WebDriver instance is started and a single browser window is opened, the <a href="#default-content">default content</a> of that window is automatically selected for receiving further commands. If more than one window is opened when the session starts, then the user MUST first select which window to act upon using the <code>switchToWindow</code> command. Until the user selects a window, all commands must return a status code of <code><a href="#status-no-such-window">no such window</a></code>.</p>
@@ -869,9 +869,9 @@ <h2 name="iterating-over-windows">Iterating Over Windows</h2>
<p>The "switchToFrame" command is used to select which frame within a window MUST be used as the context for handling future commands. All frame switching is taken from the current context from which commands are currently being handled. The "<code>id</code>" parameter can be a number or a <a>WebElement</a>. WebDriver implementations MUST determine which frame to select using the following algorithm:
<ol>
- <li>If the "id" is a number the current context is set to the equivalent of the JS expression "window.frames[n]" where "n" is the number and "window" is the DOM window represented by the current context.</li>
+ <li>If the "id" is a number the current context is set to the equivalent of the JS expression "window.frames[n]" where "n" is the number and "window" is the Document window represented by the current context.</li>
<li>If the "id" is null, the current context is set to the default context.</li>
- <li>If the "id" represents a <a>WebElement</a>, and the corresponding DOM element represents a FRAME or an IFRAME, and the <a>WebElement</a> is part of the current context, the "window" property of that DOM element becomes the current context.</li>
+ <li>If the "id" represents a <a>WebElement</a>, and the corresponding Document element represents a FRAME or an IFRAME, and the <a>WebElement</a> is part of the current context, the "window" property of that Document element becomes the current context.</li>
</ol>
<p>In all cases if no match is made a "<code><a href="#status-no-such-frame">no such frame</a></code>" status code MUST be returned.</p>
@@ -891,7 +891,7 @@ <h2 name="iterating-over-windows">Iterating Over Windows</h2>
<td></td>
</tr>
</table>
- <p>The "switchToParentFrame" command MUST set the context of future commands to the <code>window.parent</code>. If the current context is the [[!HTML5]]'s <a href="http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context">top level browsing context</a>, the context remains unchanged.</p>
+ <p>The "switchToParentFrame" command MUST set the context of future commands to the <code>window.parent</code>. If the current context is the [[!HTML51]]'s <a href="http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context">top level browsing context</a>, the context remains unchanged.</p>
</dd>
</dl>
</section>
@@ -901,7 +901,7 @@ <h2 name="iterating-over-windows">Iterating Over Windows</h2>
<h2>Running Without Window Focus</h2>
<p>All browsers must comply with the <a
href="http://www.w3.org/TR/html5/editing.html#focus">focus</a> section of
- the [[!HTML5]] spec. In particular, the requirement that the active element within a top-level browsing
+ the [[!HTML51]] spec. In particular, the requirement that the active element within a top-level browsing
context be independent of whether or not the top-level browsing context itself
has system focus MUST be followed.</p>
@@ -917,12 +917,12 @@ <h2 name="iterating-over-windows">Iterating Over Windows</h2>
<a href="http://www.w3.org/TR/2012/WD-dom-20120105/#interface-element">Element</a> as defined in the
[[!DOM4]] specification. Because the WebDriver API is designed to allow users to interact with apps as if
they were actual users, the capabilities offered by the
- <code>WebElement</code> interface are somewhat different from those offered by the DOM Element interface.</p>
+ <code>WebElement</code> interface are somewhat different from those offered by the Document Element interface.</p>
<p>Each WebElement instance must have an ID, which is distinct from the value
- of the DOM Element's "id" property. The ID for every WebElement representing the same
- underlying DOM Element MUST be the same. The IDs used to refer to different
- underlying DOM Elements MUST be unique within the session over the entire duration of the session.</p>
+ of the Document Element's "id" property. The ID for every WebElement representing the same
+ underlying Document Element MUST be the same. The IDs used to refer to different
+ underlying Document Elements MUST be unique within the session over the entire duration of the session.</p>
<div class="note">
<p>This requirement around WebElement IDs allows for efficient equality
@@ -982,14 +982,14 @@ <h2 name="iterating-over-windows">Iterating Over Windows</h2>
<h2>Element ID</h2>
<p>Strategy name: id</p>
<p>This strategy MUST be supported by all WebDriver implementations.</p>
- <p>The HTML specification ([[!HTML5]]) states that <a
+ <p>The HTML specification ([[!HTML51]]) states that <a
href="http://www.w3.org/TR/html5/dom.html#the-id-attribute">element
IDs must be unique within their home subtree</a>. Sadly, this uniqueness
requirement is not always met. Consequently, this strategy is equally
valid for finding a single element or groups of elements. In the case of
finding a single WebElement, this MUST be functionally identical to a call
to "<a href="http://www.w3.org/TR/2012/WD-dom-20120105/#dom-document-getelementbyid">document.getElementById()</a>"
- from the Web DOM Core specification ([[!DOM4]]). When finding multiple
+ from the [[!DOM4]]. When finding multiple
elements, this is equivalent to an CSS query of "<code>#value</code>" where "value" is the ID being searched for with all "'" characters being properly escaped..</p>
</section>
<section>
@@ -1031,7 +1031,7 @@ <h2 name="iterating-over-windows">Iterating Over Windows</h2>
<section>
<h2>XPath</h2>
<p>Strategy name: xpath</p>
- <p>All WebDriver implementations MUST support finding elements by XPath 1.0 [[!XPATH]] with the <a href="http://dev.w3.org/html5/spec/Overview.html#interactions-with-xpath-and-xslt">edits from section 3.3</a> of the [[!HTML5]] specification made. If no native support is present in the browser, a pure JS implementation MAY be used. When called, the returned values MUST be equivalent of calling "<a href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-evaluate">evaluate</a>" function from the DOM Level 3 XPath spec [[DOM-LEVEL-3-XPATH]] with the result type set to "<a href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-ORDERED-NODE-SNAPSHOT-TYPE">ORDERED_NODE_SNAPSHOT_TYPE</a> (7).</p>
+ <p>All WebDriver implementations MUST support finding elements by XPath 1.0 [[!XPATH]] with the <a href="http://dev.w3.org/html5/spec/Overview.html#interactions-with-xpath-and-xslt">edits from section 3.3</a> of the [[!HTML51]] specification made. If no native support is present in the browser, a pure JS implementation MAY be used. When called, the returned values MUST be equivalent of calling "<a href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-evaluate">evaluate</a>" function from [[DOM-LEVEL-3-XPATH]] with the result type set to "<a href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-ORDERED-NODE-SNAPSHOT-TYPE">ORDERED_NODE_SNAPSHOT_TYPE</a> (7).</p>
</section>
</section>
</section>
@@ -1092,16 +1092,16 @@ <h2 id='determining-if-displayed'>Determining if an element is displayed</h2>
<p>The remote end MUST determine whether a <code>WebElement</code> is selected using the following algorithm:
<ol>
<li id="is_selectable">If the item is not "<code title="selectable">selectable</code>", the WebElement is not selected. A <dfn id="selectable" title="selectable">selectable</dfn> element is either an OPTION element or an INPUT element of type "<a href="http://www.w3.org/TR/html5/forms.html#checkbox-state-(type=checkbox)">checkbox</a>" or "<a href="http://www.w3.org/TR/html5/forms.html#radio-button-state-(type=radio)">radio</a>".</li>
- <li>If the DOM node represented by the WebElement is an OPTION element, the "<a href="http://www.w3.org/TR/html5/forms.html#concept-option-selectedness">selectedness</a>" of the element, as defined in [[!HTML5]] determines whether the element is selected.</li>
- <li>Otherwise, the value of the DOM node's "<a href="http://www.w3.org/TR/html5/forms.html#attr-input-checked">checked</a>" property determines whether the element is selected. This MUST reflect the element's "<a href="http://www.w3.org/TR/html5/forms.html#concept-fe-checked">checkedness</a>" as defined in [[!HTML5]].</li>
+ <li>If the Document node represented by the WebElement is an OPTION element, the "<a href="http://www.w3.org/TR/html5/forms.html#concept-option-selectedness">selectedness</a>" of the element, as defined in [[!HTML51]] determines whether the element is selected.</li>
+ <li>Otherwise, the value of the Document node's "<a href="http://www.w3.org/TR/html5/forms.html#attr-input-checked">checked</a>" property determines whether the element is selected. This MUST reflect the element's "<a href="http://www.w3.org/TR/html5/forms.html#concept-fe-checked">checkedness</a>" as defined in [[!HTML51]].</li>
</ol>
<dl class='idl' title='partial interface WebElement'>
<dt>boolean isSelected()</dt>
<dd><p>The remote end MUST determine whether a <code>WebElement</code> is selected using the following algorithm:
<ol>
<li id="is_selectable">If the item is not "<code title="selectable">selectable</code>", the WebElement is not selected. A <dfn id="selectable" title="selectable">selectable</dfn> element is either an OPTION element or an INPUT element of type "<a href="http://www.w3.org/TR/html5/forms.html#checkbox-state-(type=checkbox)">checkbox</a>" or "<a href="http://www.w3.org/TR/html5/forms.html#radio-button-state-(type=radio)">radio</a>".</li>
- <li>If the DOM node represented by the WebElement is an OPTION element, the "<a href="http://www.w3.org/TR/html5/forms.html#concept-option-selectedness">selectedness</a>" of the element, as defined in [[!HTML5]] determines whether the element is selected.</li>
- <li>Otherwise, the value of the DOM node's "<a href="http://www.w3.org/TR/html5/forms.html#attr-input-checked">checked</a>" property determines whether the element is selected. This MUST reflect the element's "<a href="http://www.w3.org/TR/html5/forms.html#concept-fe-checked">checkedness</a>" as defined in [[!HTML5]].</li>
+ <li>If the Document node represented by the WebElement is an OPTION element, the "<a href="http://www.w3.org/TR/html5/forms.html#concept-option-selectedness">selectedness</a>" of the element, as defined in [[!HTML51]] determines whether the element is selected.</li>
+ <li>Otherwise, the value of the Document node's "<a href="http://www.w3.org/TR/html5/forms.html#attr-input-checked">checked</a>" property determines whether the element is selected. This MUST reflect the element's "<a href="http://www.w3.org/TR/html5/forms.html#concept-fe-checked">checkedness</a>" as defined in [[!HTML51]].</li>
</ol>
<dl class='parameters'>
<dt>DOMString id</dt>
@@ -1115,7 +1115,7 @@ <h2 id='determining-if-displayed'>Determining if an element is displayed</h2>
<section>
<h2 name="attributes-and-properties">Reading Attributes and Properties</h2>
- <p>Although the [[!HTML5]] spec is very clear about the difference between the properties and attributes of a DOM element, users are frequently confused between the two. Because of this, the WebDriver API offers a single command ("getElementAttribute") which covers the case of returning either of the value of a DOM element's property or attribute. If a user wishes to refer specifically to an attribute or a property, they should evaluate Javascript in order to be unambiguous.</p>
+ <p>Although the [[!HTML51]] spec is very clear about the difference between the properties and attributes of a Document element, users are frequently confused between the two. Because of this, the WebDriver API offers a single command ("getElementAttribute") which covers the case of returning either of the value of a Document element's property or attribute. If a user wishes to refer specifically to an attribute or a property, they should evaluate Javascript in order to be unambiguous.</p>
<dl class='idl' title='interface WebElement'>
<dt>DOMString getElementAttribute()</dt>
<dd>
@@ -1218,7 +1218,7 @@ <h2 name="attributes-and-properties">Reading Attributes and Properties</h2>
<dd>Horizontal whitespace characters are defined by the ECMAScript regular expression <code>[\x20\t\u2028\u2029]</code>.</dd>
</dl>
-<p>The expected return value is roughly what a text-only browser would display. This means that on browsers that support the Shadow DOM, this algorithm MUST operate on the section of the rendered DOM underneath the DOM node represented by this WebElement. The algorithm for determining this text is as follows:</p>
+<p>The expected return value is roughly what a text-only browser would display. The algorithm for determining this text is as follows:</p>
<p>Let <code>lines</code> equal an empty array. Then:
<ol>
@@ -1290,8 +1290,8 @@ <h2 name="attributes-and-properties">Reading Attributes and Properties</h2>
<li>a dictionary, then recursively apply this algorithm to each value in <code>args[index]</code> and assign the result to <code>args[index]</code>.</li>
<li>a <a href="#elements">WebElement</a>, then:
<ol>
- <li>If the element's ID does not represent a DOMElement, or it represents a DOMElement that is no longer attached to the document's tree, then the WebDriver implementation MUST immediately abort the command and return a <code title="stale-element-reference"><a href="#status-stale-element-reference">stale element reference</a></code> error.</li>
- <li>Otherwise, let <code>args[index]</code> be the underlying DOMElement.</li>
+ <li>If the element's ID does not represent a Document Element, or it represents a Document Element that is no longer attached to the document's tree, then the WebDriver implementation MUST immediately abort the command and return a <code title="stale-element-reference"><a href="#status-stale-element-reference">stale element reference</a></code> error.</li>
+ <li>Otherwise, let <code>args[index]</code> be the underlying Document Element.</li>
</ol>
</li>
<li>Otherwise WebDriver implementations MAY throw an <code><a href="#status-unknown-error">unknown error</a></code> indicating the index of the unhandled parameter but SHOULD attempt to convert the value into a dictionary.</li>
@@ -1332,7 +1332,7 @@ <h2 name="attributes-and-properties">Reading Attributes and Properties</h2>
<ol>
<li><code>undefined</code> or <code>null</code>, return <code> null</code>.
<li>a number, boolean, or DOMString, return <code>result</code>.
- <li>a DOMElement, then return the corresponding WebElement for that DOMElement.
+ <li>a Document Element, then return the corresponding WebElement for that Document Element.
<!-- Should there be a recursion limit? -->
<li>a <code>Sequence &lt;Node&gt; nodes</code>, then return the result of recursively applying this algorithm to <code>result</code>.
<!-- Should there be a limit? -->
@@ -1392,7 +1392,7 @@ <h2 name="attributes-and-properties">Reading Attributes and Properties</h2>
<ol>
<li><code>undefined</code> or <code>null</code>, return <code> null</code>.</li>
<li>a number, boolean, or DOMString, return <code>result</code>.</li>
- <li>a DOMElement, then return the corresponding WebElement for that DOMElement.</li>
+ <li>a Document Element, then return the corresponding WebElement for that Document Element.</li>
<!-- Should there be a recursion limit? -->
<li>a <code>Sequence &lt;Node> Nodes</code>, then return the result by recursively applying this algorithm to <code>result</code>. WebDriver implementations SHOULD limit the recursion depth.</li>
<!-- Should there be a limit? -->
@@ -1421,7 +1421,7 @@ <h2 name="attributes-and-properties">Reading Attributes and Properties</h2>
<p>This section describes the interaction with
<a href='http://www.w3.org/TR/html5/dom.html#dom-document-cookie'>cookies</a>
- as described in the HTML Specification ([[!HTML5]]). When retrieving
+ as described in the HTML Specification ([[!HTML51]]). When retrieving
and setting a cookie it MUST be in the format of a <code>Cookie</code>.</p>
<p class="note">Conformance tests for this section can be found in the <a href="https://github.com/w3c/web-platform-tests/tree/master/webdriver/">webdriver module</a> under the "cookies" folder.</p>
<section>
@@ -1513,7 +1513,7 @@ <h2 id="interactable">Interactable elements</h2>
<ul>
<li>If the current document is being processed as an HTML document, the element MUST be considered disabled if it does not support
the <a href="http://www.w3.org/TR/html401/interact/forms.html#adef-disabled">disabled</a>
- attribute (according to the [[!HTML5]] spec), or if the
+ attribute (according to the [[!HTML51]] spec), or if the
disabled attribute is set in the case where that attribute is present.</li>
</ul>
</li>
@@ -1911,7 +1911,7 @@ <h2 id='typing_keys'>Typing keys</h2>
<p>A requirement for key-based interaction with an element is that it is
<a href="#interactable">interactable</a>. Typing into an element is permitted if one of the following conditions is met:
<ul>
- <li>The element is <a href="http://dev.w3.org/html5/spec/editing.html#focus">focusable</a> as defined in the editing section of the [[!HTML5]] spec.</li>
+ <li>The element is <a href="http://dev.w3.org/html5/spec/editing.html#focus">focusable</a> as defined in the editing section of the [[!HTML51]] spec.</li>
<li>The element is allowed to be the <code>activeElement</code>. In
addition to focusable elements, this allows typing to the <code>BODY</code> element.</li>
<li>In an HTML document, the element is <a href="http://dev.w3.org/html5/spec/editing.html#attr-contenteditable">editable</a> as a result of having its <code>contentEditable</code> attribute set or the containing document is in <code>designMode</code>.</li>
@@ -1926,7 +1926,7 @@ <h2 id='typing_keys'>Typing keys</h2>
<li>The element is not already the document's active element.</li>
<li>The owner document of the element to be interacted with is not the focused document.</li>
</ul>
- <p>In case focusing is needed, the implementation MUST follow the <a href="http://dev.w3.org/html5/spec/editing.html#focus-management"><b>focusing steps</b></a> as described in the focus management section of the [[!HTML5]] spec. The focus MUST NOT leave the element at the end of the interaction, other than as a result of the interaction itself (i.e. when the tab key is sent).
+ <p>In case focusing is needed, the implementation MUST follow the <a href="http://dev.w3.org/html5/spec/editing.html#focus-management"><b>focusing steps</b></a> as described in the focus management section of the [[!HTML51]] spec. The focus MUST NOT leave the element at the end of the interaction, other than as a result of the interaction itself (i.e. when the tab key is sent).
</p>
<dl class="idl" title="partial interface WebElement">
<dt>void clear()</dt>
@@ -2242,15 +2242,15 @@ <h2 id='typing_keys'>Typing keys</h2>
<p>If this capability is supported, local end MUST add the <code>TakesScreenshot</code> interface to the <code>WebDriver</code> interface.</p>
- <p>This command will take a screenshot of the current window. Implementations of the remote end SHOULD capture the entire DOM, even if this would require a user to scroll the browser window. That is, the returned PNG SHOULD have the same width and height as returned by a call to <code>getSize</code> of the BODY element and MUST contain all visible content on the page, and this SHOULD be done without resizing the browser window. If the remote end is unable to capture the entire DOM, then the part of the DOM currently displayed in UI of the browser MUST be captured without additional chrome such as scrollbars and browser chrome.</p>
+ <p>This command will take a screenshot of the current window. Implementations of the remote end SHOULD capture the entire Document, even if this would require a user to scroll the browser window. That is, the returned PNG SHOULD have the same width and height as returned by a call to <code>getSize</code> of the BODY element and MUST contain all visible content on the page, and this SHOULD be done without resizing the browser window. If the remote end is unable to capture the entire Document, then the part of the Document currently displayed in UI of the browser MUST be captured without additional chrome such as scrollbars and browser chrome.</p>
<div class="note">
- <p>One way to think of capturing the entire DOM is that the user has an infinitely large monitor and has resized the window to allow all content to be visible. One of those monitors would be very cool.</p>
+ <p>One way to think of capturing the entire Document is that the user has an infinitely large monitor and has resized the window to allow all content to be visible. One of those monitors would be very cool.</p>
</div>
<p>Nested frames MUST be sized as if the user has resized the window to the dimensions of the PNG being returned. This often means that not all potentially visible content within the nested frames is captured.</p>
- <p>Remote ends MUST NOT attempt to track changes in window size as the screenshot is being taken. In particular this means that in the case of a page that makes use of "infinite scrolling" (where an AJAX call is used to populate additional content as the user scrolls down) or in some other way resizes content as the window size is changed only the content that was originally contained in the DOM when the command is executed will be captured.</p>
+ <p>Remote ends MUST NOT attempt to track changes in window size as the screenshot is being taken. In particular this means that in the case of a page that makes use of "infinite scrolling" (where an AJAX call is used to populate additional content as the user scrolls down) or in some other way resizes content as the window size is changed only the content that was originally contained in the Document when the command is executed will be captured.</p>
</section>
<section>
<h2>Element</h2>
@@ -2260,21 +2260,21 @@ <h2 id='typing_keys'>Typing keys</h2>
</table>
<p>If this capability is supported, local end MUST add the <code>TakesScreenshot</code> interface to the <code>WebElement</code> interface.</p>
- <p>Remote ends SHOULD take a screenshot of the area bounded by the clientBoundingRect of the DOM element represented by the <code>WebElement</code>, returning it as a Base64 encoded, lossless PNG. Local ends MUST make the PNG available directly to the user as at least one of a binary blob or a file. If the remote end cannot capture the entire clientBoundingRect, they MUST scroll as much of the element into the current browser viewport as possible and capture the maximum visible area without additional browser chrome.</p>
+ <p>Remote ends SHOULD take a screenshot of the area bounded by the clientBoundingRect of the Document element represented by the <code>WebElement</code>, returning it as a Base64 encoded, lossless PNG. Local ends MUST make the PNG available directly to the user as at least one of a binary blob or a file. If the remote end cannot capture the entire clientBoundingRect, they MUST scroll as much of the element into the current browser viewport as possible and capture the maximum visible area without additional browser chrome.</p>
<p>If the <code>WebElement</code> represents a FRAME or IFRAME element, this is equivalent of taking a screenshot of the frame's BODY element.</p>
</section>
</section>
<section>
<h2>Handling non-HTML Content</h2>
<p>Non-HTML content MUST be treated in the same manner as HTML if the Non-HTML if the browser
- creates a DOM object for the content of the document. If a DOM Object is not created then
+ creates a Document object for the content of the document. If a Document Object is not created then
how it handled SHOULD be non-normative</p>
<section>
<h2>XML</h2>
<p>This section describes XML documents as described in [[XML10]]. For XHTML documents the remote end should treat them as HTML documents
and not have the caveats, below, applied.</p>
- <p>Since Browsers create a DOM object for XML pages it is expected that we can interogate
+ <p>Since Browsers create a Document object for XML pages it is expected that we can interogate
them as a normal HTML document however the following differences should be noted:</p>
<ul>
<li>Visibility Checks MAY be skipped since XML nodes can not be hidden and <code>isDisplayed</code> MUST return true<li>
@@ -2290,8 +2290,8 @@ <h2 id='typing_keys'>Typing keys</h2>
<section>
<h2>SVG</h2>
<p>This section described SVG documents in a browser as described by [[SVG2]].
- Since browsers create a DOM tree for SVG documents it is expected that WebDriver
- can interrogate the DOM as a normal HTML document.
+ Since browsers create a Document tree for SVG documents it is expected that WebDriver
+ can interrogate the Document as a normal HTML document.
</p>
</section>
@@ -2328,7 +2328,7 @@ <h2 id='typing_keys'>Typing keys</h2>
<section class='appendix'>
<h2>Command Summary</h2>
-
+
<p>This is an exhaustive list of the commands listed in this specification.</p>
</section><section class='appendix'>
<h2>Capabilities</h2>
Please sign in to comment.
Something went wrong with that request. Please try again.