@@ -2423,6 +2423,14 @@ <h2>Sessions</h2>
2423
2423
or implicitly when < a > Close Window</ a > is called
2424
2424
at the last remaining < a > top-level browsing context</ a > .
2425
2425
2426
+ < p > An < a > intermediary node</ a > will maintain an < dfn > associated
2427
+ session</ dfn > for each active < a > session</ a > . This is
2428
+ the < a > session</ a > on the < a > upstream</ a > neighbor that is created
2429
+ when the < a > intermediary node</ a > executes the < a > New
2430
+ Session</ a > < a > command</ a > . Closing a < a > session</ a > on
2431
+ an < a > intermediary node</ a > will also < a > close the session</ a > of
2432
+ the < a > associated session</ a > .
2433
+
2426
2434
< p > All < a > commands</ a > , except < a > New Session</ a > and < a > Status</ a > ,
2427
2435
have an associated < dfn > current session</ dfn > ,
2428
2436
which is the < a > session</ a > in which that < a > command</ a > will run.
@@ -2496,15 +2504,34 @@ <h2>Sessions</h2>
2496
2504
a < a > remote end</ a > must take the following steps:
2497
2505
2498
2506
< ol >
2499
- < li > < p > Set the < a > webdriver-active flag</ a > to false.
2507
+ < li > < p > Perform the folowing substeps based on the < a > remote end</ a > 's
2508
+ type:
2509
+ < dl class =switch >
2510
+ < dt > < a > Remote end</ a > is an < a > endpoint node</ a >
2511
+ < dd >
2512
+ < ol >
2513
+ < li > < p > Set the < a > webdriver-active flag</ a > to false.
2500
2514
2501
- < li > < p > < a > Close</ a > any < a > top-level browsing contexts</ a >
2502
- associated with the < a > session</ a > ,
2503
- without < a > prompting to unload</ a > .
2515
+ < li > < p > An < a > endpoint node</ a > must < a > close</ a > any < a > top-level
2516
+ browsing contexts</ a > associated with the < a > session</ a > ,
2517
+ without < a > prompting to unload</ a > .
2518
+ </ ol >
2519
+ < dt > < a > Remote end</ a > is an < a > intermediary node</ a >
2520
+ < dd >
2521
+ < ol >
2522
+ < li > < p > < a > Close</ a > the < a > associated session</ a > . If this causes
2523
+ an < a > error</ a > to occur, complete the remainder of this
2524
+ algorithm before returning the < a > error</ a > .
2525
+ </ ol >
2526
+ </ dl >
2504
2527
2505
2528
< li > < p > Remove the < a > current session</ a > from < a > active sessions</ a > .
2506
2529
2507
2530
< li > < p > Perform any implementation-specific cleanup steps.
2531
+
2532
+ < li > < p > If an < a > error</ a > has occurred in any of the steps above,
2533
+ return the < a > error</ a > , otherwise return < a > success</ a > with
2534
+ data < a > < code > null</ code > </ a > .
2508
2535
</ ol >
2509
2536
2510
2537
< p > Closing a < a > session</ a > might cause the associated browser process to be killed.
@@ -2565,12 +2592,21 @@ <h3>New Session</h3>
2565
2592
< p > The < a > remote end steps</ a > are:
2566
2593
2567
2594
< ol >
2568
- < li > < p > If the < a > remote end</ a > is an < a > intermediary node</ a > ,
2569
- take implementation-defined steps that either result in
2570
- returning an < a > error</ a > with < a > error code</ a > < a > session not created</ a > ,
2571
- or in returning a < a > success</ a > with data
2572
- that is isomorphic to that returned by < a > remote ends</ a >
2573
- according to the rest of this algorithm.
2595
+ < li > < p > If the < a > remote end</ a > is an < a > intermediary node</ a > , take
2596
+ implementation-defined steps that either result in returning
2597
+ an < a > error</ a > with < a > error code</ a > < a > session not created</ a > ,
2598
+ or in returning a < a > success</ a > with data that is isomorphic to
2599
+ that returned by < a > remote ends</ a > according to the rest of this
2600
+ algorithm. If an < a > error</ a > is not returned, the < a > intermediary
2601
+ node</ a > must retain a reference to the < a > session</ a > created on
2602
+ the < a > upstream</ a > node as the < a > associated session</ a > such that
2603
+ commands may be forwarded to this < a > associated session</ a > on
2604
+ subsequent commands.
2605
+
2606
+ < p class =note > How this is done is entirely up to the implementation,
2607
+ but typically the < code > sessionId</ code > , and < a > URL</ a > and
2608
+ < a > URL prefix</ a > of the < a > upstream</ a > < a > remote end</ a > will need
2609
+ to be tracked.
2574
2610
2575
2611
< li > < p > If the < a > maximum active sessions</ a > is equal to
2576
2612
the length of the list of < a > active sessions</ a > ,
@@ -2685,7 +2721,7 @@ <h3>Delete Session</h3>
2685
2721
< p > The < a > remote end steps</ a > are:
2686
2722
2687
2723
< ol >
2688
- < li > < p > < a > Close the session</ a > .
2724
+ < li > < p > < a > Try </ a > to < a > close the session</ a > .
2689
2725
2690
2726
< li > < p > Return < a > success</ a > with data < a > < code > null</ code > </ a > .
2691
2727
</ ol >
@@ -3439,7 +3475,7 @@ <h3>Close Window</h3>
3439
3475
< li > < p > < a > Close</ a > the < a > current top-level browsing context</ a > .
3440
3476
3441
3477
< li > < p > If there are no more open < a > top-level browsing contexts</ a > ,
3442
- then < a > close the session</ a > .
3478
+ then < a > try </ a > to < a > close the session</ a > .
3443
3479
3444
3480
< li > Return the result of running the < a > remote end steps</ a >
3445
3481
for the < a > Get Window Handles</ a > < a > command</ a > .
0 commit comments