Skip to content

Commit 87fc501

Browse files
shs96cAutomatedTester
authored andcommitted
Navigation: use trying when waiting for navigation.
Closes #797
1 parent cfbdd21 commit 87fc501

File tree

1 file changed

+33
-28
lines changed

1 file changed

+33
-28
lines changed

webdriver-spec.html

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2984,29 +2984,37 @@ <h2>Navigation</h2>
29842984
run the following steps:
29852985

29862986
<ol>
2987-
<li><p>If the <a>current session</a>'s <a>page loading strategy</a>
2988-
is not <code>"none"</code> and if there is an ongoing attempt to
2989-
<a>navigate</a> the <a>current browsing context</a> that has not
2990-
yet <a>matured</a>, wait for navigation to complete.
2987+
<li><p>If the <a>current session</a> has a <a>page loading
2988+
strategy</a> of <a>none</a> return <a>success</a> with
2989+
data <a><code>null</code></a>.
2990+
2991+
<li><p>Start a <var>timer</var>. If this algorithm has not
2992+
completed before <var>timer</var> reaches
2993+
the <a>session</a>'s <a>session page load timeout</a> in
2994+
milliseconds, return an <a>error</a> with <a>error
2995+
code</a> <a>timeout</a>.
2996+
2997+
<li><p>If there is an ongoing attempt to <a>navigate</a>
2998+
the <a>current browsing context</a> that has not
2999+
yet <a>matured</a>, wait for navigation to <a>mature</a>.
3000+
3001+
<li><p>Let <var>readiness target</var> be the <a>document
3002+
readiness</a> state associated with the <a>current
3003+
session</a>’s <a>page loading strategy</a>, which can be found in
3004+
the <a>table of page load strategies</a>.
3005+
3006+
<li><p>Wait for the the <a>current browsing context</a>’s
3007+
<a>document readiness</a> state to reach
3008+
<var>readiness target</var>, or for the
3009+
<a>session page load timeout</a> to pass, whichever
3010+
occurs sooner.
3011+
3012+
<li><p>If the previous step completed by the
3013+
<a>session page load timeout</a> being reached
3014+
and the browser does not have an active <a>user prompt</a>,
3015+
return <a>error</a> with <a>error code</a> <a>timeout</a>.
29913016

2992-
<li><p>If the <a>current session</a> has a <a>page loading strategy</a>:
2993-
2994-
<ol>
2995-
<li><p>Let <var>readiness target</var> be the <a>document readiness</a> state
2996-
tied to the <a>current session</a>’s <a>page loading strategy</a>,
2997-
which can be found in the <a>table of page load strategies</a>.
2998-
2999-
<li><p>Wait for the the <a>current browsing context</a>’s
3000-
<a>document readiness</a> state
3001-
to reach <var>readiness target</var>,
3002-
or for the <a>session page load timeout</a> to pass,
3003-
whichever occurs sooner.
3004-
3005-
<li><p>If the previous step completed by the
3006-
<a>session page load timeout</a> being reached
3007-
and the browser does not have an active <a>user prompt</a>,
3008-
return <a>error</a> with <a>error code</a> <a>timeout</a>.
3009-
</ol>
3017+
<li><p>Return <a>success</a> with data <a><code>null</code></a>.
30103018
</ol>
30113019

30123020
<p>When asked to run the <dfn>post-navigation checks</dfn>,
@@ -3107,8 +3115,7 @@ <h3>Go</h3>
31073115
<li><p>Run the <a>post-navigation checks</a>
31083116
and return its value if it is an <a>error</a>.
31093117

3110-
<li><p><a>Wait for navigation to complete</a>
3111-
and return its value if it is an <a>error</a>.
3118+
<li><p><a>Try</a> to <a>wait for navigation to complete</a>.
31123119
</ol>
31133120

31143121
<li><p>Set the <a>current browsing context</a>
@@ -3294,8 +3301,7 @@ <h3>Refresh</h3>
32943301
<li><p>Run the <a>post-navigation checks</a>
32953302
and return its value if it is an <a>error</a>.
32963303

3297-
<li><p><a>Wait for navigation to complete</a>
3298-
and return its value if it is an <a>error</a>.
3304+
<li><p><a>Try</a> to <a>wait for navigation to complete</a>.
32993305

33003306
<li><p>Set the <a>current browsing context</a>
33013307
to the <a>current top-level browsing context</a>.
@@ -5279,8 +5285,7 @@ <h3>Element Click</h3>
52795285
<li><p>Run the <a>post-navigation checks</a>
52805286
and return its value if it is an <a>error</a>.
52815287

5282-
<li><p><a>Wait for navigation to complete</a>
5283-
and return its value if it is an <a>error</a>.
5288+
<li><p><a>Try</a> to <a>wait for navigation to complete</a>.
52845289
</ol>
52855290

52865291
<p class=example>Note that one may not know

0 commit comments

Comments
 (0)