Skip to content

Commit 5a2d8a4

Browse files
jgrahamAutomatedTester
authored andcommitted
Add a hook immediately before a new session is created
The hook allows other specs to get access to the session and the capabilities immediately before the new session response is sent to the local end. This allows them to set up any state that is connected to the session, and update the value of any capabilities they own in the response.
1 parent a953788 commit 5a2d8a4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,17 @@ <h3>Extensions</h3>
13791379
matched, or a non-null JSON-serializable value if the capability is
13801380
matched.
13811381

1382+
<p>Other specifications may also define a <dfn>WebDriver new
1383+
session algorithm</dfn>, which are called just after a new session is
1384+
created, and before the <a>new session</a> response is sent to the
1385+
<a>remote end</a>. These algorithms are called with <var>session</var>
1386+
representing the WebDriver session that will be established,
1387+
and <var>capabilites</var>, the capabilities object that will be
1388+
returned to the <a>remote end</a>. It is permitted for such an
1389+
algorithm to modify any entry in the capabilities object with a name
1390+
that's an <a>additional WebDriver capability</a> defined by the same
1391+
specification.
1392+
13821393
<p><a>Remote ends</a> may also introduce
13831394
<dfn data-lt="extension capability">extension capabilities</dfn>
13841395
that are extra <a>capabilities</a>
@@ -2350,6 +2361,10 @@ <h3 id=new-session><dfn data-lt="new sessions|creating a new session">New Sessio
23502361

23512362
<li><p>Set the <a>current session</a> to <var>session</var>.
23522363

2364+
<li><p>Run any <a>WebDriver new session algorithm</a>defined in
2365+
external specifications, with arguments <var>session</var>
2366+
and <var>capabilities</var>.
2367+
23532368
<li><p>Append <var>session</var> to <a>active sessions</a>.
23542369

23552370
<li><p>Let <var>body</var> be a JSON <a>Object</a> initialised with:

0 commit comments

Comments
 (0)