Skip to content

Commit

Permalink
Adds 'Consume User Activation of Window' via WebDriver
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Dec 12, 2022
1 parent 66bc0c4 commit a3ea121
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4341,6 +4341,23 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
</ul>
</dd>


<dt>WebDriver</dt>

<dd>
<p>The following terms are defined in <cite>WebDriver</cite>: <ref spec=WEBDRIVER></p>

<ul class="brief">
<li><dfn data-x-href="https://w3c.github.io/webdriver/#dfn-error" data-x="wd-error">Error</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/webdriver/#dfn-error-code" data-x="wd-error-code">Error code</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/webdriver/#dfn-extension-commands" data-x="wd-extension-command">Extension commands</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/webdriver/#dfn-extension-command-uri-template" data-x="wd-uri-template">Extension command URI Template</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/webdriver/#dfn-handle-any-user-prompts">Handle any user prompts</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/webdriver/#dfn-no-such-window">No such window</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/webdriver/#dfn-remote-end-steps">Remote end steps</dfn></li>
</ul>
</dd>

<dt>WebDriver BiDi</dt>

<dd>
Expand Down Expand Up @@ -76022,6 +76039,50 @@ partial interface <span id="NavigatorUserActivation-partial">Navigator</span> {

</div>

<h4>Automated Testing</h4>

<p>
For the purposes of user-agent automation and application testing, this document defines the
following <span data-x="wd-extension-command">extension commands</span> for the <cite>Web
Driver</cite> specification. <ref spec=WEBDRIVERBIDI> It is optional for a user agent to support
the following <span data-x="wd-extension-command">extension commands</span>.
</p>

<h5><dfn>Consume user activation of Window</dfn></h5>

<table>
<thead>
<tr>
<th>HTTP Method
<th><span data-x="wd-uri-template">URI Template</span>
<th><span data-x="wd-extension-command">Command</span>
<tbody>
<tr>
<td>POST
<td>/session/{<var>session id</var>}/window/consume-user-activation
<td><span>Consume user activation of Window</span>
</table>

<p>The <span>remote end steps</span> are:

<ol>
<li><p>If the <span>top-level browsing context</span> has been <span data-x="bcg
remove">removed</span>, return <span data-x="wd-error">error</span> with <span
data-x="wd-error-code">error code</span> <span>no such window</span>.

<li><p><span>Handle any user prompts</span> and return its value if it is an <span
data-x="wd-error">error</span>.

<li><p>Let <var>window</var> be <span>top-level browsing context</span>'s <span>active
window</span>.

<li><p>Let <var>consume</var> be true if <var>window</var> has <span>transient activation</span>
or false otherwise.

<li><p>If <var>consume</var> is true, <span>consume user activation</span> of <var>window</var>.

<li><p>Return <var>success</var> with data <var>consume</var>.
</ol>

<h3 id="activation">Activation behavior of elements</h3>

Expand Down Expand Up @@ -131604,6 +131665,9 @@ INSERT INTERFACES HERE
<dt id="refsWEBCRYPTO">[WEBCRYPTO]</dt>
<dd><cite><a href="https://w3c.github.io/webcrypto/Overview.html">Web Cryptography API</a></cite>, D. Huigens. W3C.</dd>

<dt id="refsWEBDRIVER">[WEBDRIVER]</dt>
<dd><cite><a href="https://w3c.github.io/webdriver/">WebDriver</a></cite>, S. Stewart, D. Burns. W3C</dd>

<dt id="refsWEBDRIVERBIDI">[WEBDRIVERBIDI]</dt>
<dd><cite><a href="https://w3c.github.io/webdriver-bidi/">WebDriver BiDi</a></cite>. W3C</dd>

Expand Down

0 comments on commit a3ea121

Please sign in to comment.