@@ -1429,7 +1429,7 @@ <h2 id="returns">Returns</h2>
1429
1429
- `page.goto()`
1430
1430
- `page.reload()`
1431
1431
- `page.set_content()`
1432
- - `page.wait_for_navigation ()`
1432
+ - `page.expect_navigation ()`
1433
1433
1434
1434
> NOTE: `page.set_default_navigation_timeout()` and `page.set_default_timeout()` take priority over
1435
1435
`browser_context.set_default_navigation_timeout()`.
@@ -2078,7 +2078,7 @@ <h2 id="returns">Returns</h2>
2078
2078
) -> typing.Any:
2079
2079
"""BrowserContext.wait_for_event
2080
2080
2081
- > NOTE: In most cases, you should use `browser_context.wait_for_event ()`.
2081
+ > NOTE: In most cases, you should use `browser_context.expect_event ()`.
2082
2082
2083
2083
Waits for given `event` to fire. If predicate is provided, it passes event's value into the `predicate` function and
2084
2084
waits for `predicate(event)` to return a truthy value. Will throw an error if the socket is closed before the `event` is
@@ -3090,7 +3090,7 @@ <h2 id="parameters">Parameters</h2>
3090
3090
- <code>page.goto()</code>
3091
3091
- <code>page.reload()</code>
3092
3092
- <code>page.set_content()</code>
3093
- - <code>page.wait_for_navigation ()</code></p>
3093
+ - <code>page.expect_navigation ()</code></p>
3094
3094
<blockquote>
3095
3095
<p>NOTE: <code>page.set_default_navigation_timeout()</code> and <code>page.set_default_timeout()</code> take priority over
3096
3096
<code>browser_context.set_default_navigation_timeout()</code>.</p>
@@ -3113,7 +3113,7 @@ <h2 id="parameters">Parameters</h2>
3113
3113
- `page.goto()`
3114
3114
- `page.reload()`
3115
3115
- `page.set_content()`
3116
- - `page.wait_for_navigation ()`
3116
+ - `page.expect_navigation ()`
3117
3117
3118
3118
> NOTE: `page.set_default_navigation_timeout()` and `page.set_default_timeout()` take priority over
3119
3119
`browser_context.set_default_navigation_timeout()`.
@@ -3424,7 +3424,7 @@ <h2 id="parameters">Parameters</h2>
3424
3424
<dd>
3425
3425
<div class="desc"><p>BrowserContext.wait_for_event</p>
3426
3426
<blockquote>
3427
- <p>NOTE: In most cases, you should use <code>browser_context.wait_for_event ()</code>.</p>
3427
+ <p>NOTE: In most cases, you should use <code>browser_context.expect_event ()</code>.</p>
3428
3428
</blockquote>
3429
3429
<p>Waits for given <code>event</code> to fire. If predicate is provided, it passes event's value into the <code>predicate</code> function and
3430
3430
waits for <code>predicate(event)</code> to return a truthy value. Will throw an error if the socket is closed before the <code>event</code> is
@@ -3453,7 +3453,7 @@ <h2 id="returns">Returns</h2>
3453
3453
) -> typing.Any:
3454
3454
"""BrowserContext.wait_for_event
3455
3455
3456
- > NOTE: In most cases, you should use `browser_context.wait_for_event ()`.
3456
+ > NOTE: In most cases, you should use `browser_context.expect_event ()`.
3457
3457
3458
3458
Waits for given `event` to fire. If predicate is provided, it passes event's value into the `predicate` function and
3459
3459
waits for `predicate(event)` to return a truthy value. Will throw an error if the socket is closed before the `event` is
@@ -16846,7 +16846,7 @@ <h2 id="parameters">Parameters</h2>
16846
16846
- `page.goto()`
16847
16847
- `page.reload()`
16848
16848
- `page.set_content()`
16849
- - `page.wait_for_navigation ()`
16849
+ - `page.expect_navigation ()`
16850
16850
16851
16851
> NOTE: `page.set_default_navigation_timeout()` takes priority over `page.set_default_timeout()`,
16852
16852
`browser_context.set_default_timeout()` and `browser_context.set_default_navigation_timeout()`.
@@ -16900,7 +16900,7 @@ <h2 id="parameters">Parameters</h2>
16900
16900
The method finds an element matching the specified selector within the page. If no elements match the selector, the
16901
16901
return value resolves to `null`.
16902
16902
16903
- Shortcut for main frame's `frame.$ ()`.
16903
+ Shortcut for main frame's `frame.query_selector ()`.
16904
16904
16905
16905
Parameters
16906
16906
----------
@@ -16929,7 +16929,7 @@ <h2 id="parameters">Parameters</h2>
16929
16929
The method finds all elements matching the specified selector within the page. If no elements match the selector, the
16930
16930
return value resolves to `[]`.
16931
16931
16932
- Shortcut for main frame's `frame.$$ ()`.
16932
+ Shortcut for main frame's `frame.query_selector_all ()`.
16933
16933
16934
16934
Parameters
16935
16935
----------
@@ -17417,7 +17417,7 @@ <h2 id="parameters">Parameters</h2>
17417
17417
The method finds an element matching the specified selector within the page and passes it as a first argument to
17418
17418
`pageFunction`. If no elements match the selector, the method throws an error. Returns the value of `pageFunction`.
17419
17419
17420
- If `pageFunction` returns a [Promise], then `page.$eval ()` would wait for the promise to resolve and return its
17420
+ If `pageFunction` returns a [Promise], then `page.eval_on_selector ()` would wait for the promise to resolve and return its
17421
17421
value.
17422
17422
17423
17423
Examples:
@@ -17428,7 +17428,7 @@ <h2 id="parameters">Parameters</h2>
17428
17428
html = await page.eval_on_selector(\".main-container\", \"(e, suffix) => e.outer_html + suffix\", \"hello\")
17429
17429
```
17430
17430
17431
- Shortcut for main frame's `frame.$eval ()`.
17431
+ Shortcut for main frame's `frame.eval_on_selector ()`.
17432
17432
17433
17433
Parameters
17434
17434
----------
@@ -17476,7 +17476,7 @@ <h2 id="parameters">Parameters</h2>
17476
17476
The method finds all elements matching the specified selector within the page and passes an array of matched elements as
17477
17477
a first argument to `pageFunction`. Returns the result of `pageFunction` invocation.
17478
17478
17479
- If `pageFunction` returns a [Promise], then `page.$$eval ()` would wait for the promise to resolve and return its
17479
+ If `pageFunction` returns a [Promise], then `page.eval_on_selector_all ()` would wait for the promise to resolve and return its
17480
17480
value.
17481
17481
17482
17482
Examples:
@@ -18001,7 +18001,7 @@ <h2 id="parameters">Parameters</h2>
18001
18001
) -> typing.Any:
18002
18002
"""Page.wait_for_event
18003
18003
18004
- > NOTE: In most cases, you should use `page.wait_for_event ()`.
18004
+ > NOTE: In most cases, you should use `page.expect_event ()`.
18005
18005
18006
18006
Waits for given `event` to fire. If predicate is provided, it passes event's value into the `predicate` function and
18007
18007
waits for `predicate(event)` to return a truthy value. Will throw an error if the socket is closed before the `event` is
@@ -18452,7 +18452,7 @@ <h2 id="parameters">Parameters</h2>
18452
18452
By default, `page.close()` **does not** run `beforeunload` handlers.
18453
18453
18454
18454
> NOTE: if `runBeforeUnload` is passed as true, a `beforeunload` dialog might be summoned and should be handled manually
18455
- via [`event: Page. dialog`] event.
18455
+ via `page.on(' dialog')` event.
18456
18456
18457
18457
Parameters
18458
18458
----------
@@ -19748,7 +19748,7 @@ <h2 id="parameters">Parameters</h2>
19748
19748
> NOTE: Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to change the URL is
19749
19749
considered a navigation.
19750
19750
19751
- Shortcut for main frame's `frame.wait_for_navigation ()`.
19751
+ Shortcut for main frame's `frame.expect_navigation ()`.
19752
19752
19753
19753
Parameters
19754
19754
----------
@@ -20674,7 +20674,7 @@ <h2 id="parameters">Parameters</h2>
20674
20674
<p>By default, <code>page.close()</code> <strong>does not</strong> run <code>beforeunload</code> handlers.</p>
20675
20675
<blockquote>
20676
20676
<p>NOTE: if <code>runBeforeUnload</code> is passed as true, a <code>beforeunload</code> dialog might be summoned and should be handled manually
20677
- via [ <code>event: Page. dialog</code>] event.</p>
20677
+ via <code>page.on(' dialog') </code> event.</p>
20678
20678
</blockquote>
20679
20679
<h2 id="parameters">Parameters</h2>
20680
20680
<dl>
@@ -20695,7 +20695,7 @@ <h2 id="parameters">Parameters</h2>
20695
20695
By default, `page.close()` **does not** run `beforeunload` handlers.
20696
20696
20697
20697
> NOTE: if `runBeforeUnload` is passed as true, a `beforeunload` dialog might be summoned and should be handled manually
20698
- via [`event: Page. dialog`] event.
20698
+ via `page.on(' dialog')` event.
20699
20699
20700
20700
Parameters
20701
20701
----------
@@ -21099,14 +21099,14 @@ <h2 id="parameters">Parameters</h2>
21099
21099
<div class="desc"><p>Page.eval_on_selector</p>
21100
21100
<p>The method finds an element matching the specified selector within the page and passes it as a first argument to
21101
21101
<code>pageFunction</code>. If no elements match the selector, the method throws an error. Returns the value of <code>pageFunction</code>.</p>
21102
- <p>If <code>pageFunction</code> returns a [Promise], then <code>page.$eval ()</code> would wait for the promise to resolve and return its
21102
+ <p>If <code>pageFunction</code> returns a [Promise], then <code>page.eval_on_selector ()</code> would wait for the promise to resolve and return its
21103
21103
value.</p>
21104
21104
<p>Examples:</p>
21105
21105
<pre><code class="language-py">search_value = await page.eval_on_selector("#search", "el => el.value")
21106
21106
preload_href = await page.eval_on_selector("link[rel=preload]", "el => el.href")
21107
21107
html = await page.eval_on_selector(".main-container", "(e, suffix) => e.outer_html + suffix", "hello")
21108
21108
</code></pre>
21109
- <p>Shortcut for main frame's <code>frame.$eval ()</code>.</p>
21109
+ <p>Shortcut for main frame's <code>frame.eval_on_selector ()</code>.</p>
21110
21110
<h2 id="parameters">Parameters</h2>
21111
21111
<dl>
21112
21112
<dt><strong><code>selector</code></strong> : <code>str</code></dt>
@@ -21141,7 +21141,7 @@ <h2 id="returns">Returns</h2>
21141
21141
The method finds an element matching the specified selector within the page and passes it as a first argument to
21142
21142
`pageFunction`. If no elements match the selector, the method throws an error. Returns the value of `pageFunction`.
21143
21143
21144
- If `pageFunction` returns a [Promise], then `page.$eval ()` would wait for the promise to resolve and return its
21144
+ If `pageFunction` returns a [Promise], then `page.eval_on_selector ()` would wait for the promise to resolve and return its
21145
21145
value.
21146
21146
21147
21147
Examples:
@@ -21152,7 +21152,7 @@ <h2 id="returns">Returns</h2>
21152
21152
html = await page.eval_on_selector(\".main-container\", \"(e, suffix) => e.outer_html + suffix\", \"hello\")
21153
21153
```
21154
21154
21155
- Shortcut for main frame's `frame.$eval ()`.
21155
+ Shortcut for main frame's `frame.eval_on_selector ()`.
21156
21156
21157
21157
Parameters
21158
21158
----------
@@ -21196,7 +21196,7 @@ <h2 id="returns">Returns</h2>
21196
21196
<div class="desc"><p>Page.eval_on_selector_all</p>
21197
21197
<p>The method finds all elements matching the specified selector within the page and passes an array of matched elements as
21198
21198
a first argument to <code>pageFunction</code>. Returns the result of <code>pageFunction</code> invocation.</p>
21199
- <p>If <code>pageFunction</code> returns a [Promise], then <code>page.$$eval ()</code> would wait for the promise to resolve and return its
21199
+ <p>If <code>pageFunction</code> returns a [Promise], then <code>page.eval_on_selector_all ()</code> would wait for the promise to resolve and return its
21200
21200
value.</p>
21201
21201
<p>Examples:</p>
21202
21202
<pre><code class="language-py">div_counts = await page.eval_on_selector_all("div", "(divs, min) => divs.length >= min", 10)
@@ -21235,7 +21235,7 @@ <h2 id="returns">Returns</h2>
21235
21235
The method finds all elements matching the specified selector within the page and passes an array of matched elements as
21236
21236
a first argument to `pageFunction`. Returns the result of `pageFunction` invocation.
21237
21237
21238
- If `pageFunction` returns a [Promise], then `page.$$eval ()` would wait for the promise to resolve and return its
21238
+ If `pageFunction` returns a [Promise], then `page.eval_on_selector_all ()` would wait for the promise to resolve and return its
21239
21239
value.
21240
21240
21241
21241
Examples:
@@ -21758,7 +21758,7 @@ <h2 id="returns">Returns</h2>
21758
21758
<p>NOTE: Usage of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History API</a> to change the URL is
21759
21759
considered a navigation.</p>
21760
21760
</blockquote>
21761
- <p>Shortcut for main frame's <code>frame.wait_for_navigation ()</code>.</p>
21761
+ <p>Shortcut for main frame's <code>frame.expect_navigation ()</code>.</p>
21762
21762
<h2 id="parameters">Parameters</h2>
21763
21763
<dl>
21764
21764
<dt><strong><code>url</code></strong> : <code>Union[Callable[[str], bool], Pattern, str, NoneType]</code></dt>
@@ -21808,7 +21808,7 @@ <h2 id="returns">Returns</h2>
21808
21808
> NOTE: Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to change the URL is
21809
21809
considered a navigation.
21810
21810
21811
- Shortcut for main frame's `frame.wait_for_navigation ()`.
21811
+ Shortcut for main frame's `frame.expect_navigation ()`.
21812
21812
21813
21813
Parameters
21814
21814
----------
@@ -23847,7 +23847,7 @@ <h2 id="parameters">Parameters</h2>
23847
23847
<div class="desc"><p>Page.query_selector</p>
23848
23848
<p>The method finds an element matching the specified selector within the page. If no elements match the selector, the
23849
23849
return value resolves to <code>null</code>.</p>
23850
- <p>Shortcut for main frame's <code>frame.$ ()</code>.</p>
23850
+ <p>Shortcut for main frame's <code>frame.query_selector ()</code>.</p>
23851
23851
<h2 id="parameters">Parameters</h2>
23852
23852
<dl>
23853
23853
<dt><strong><code>selector</code></strong> : <code>str</code></dt>
@@ -23870,7 +23870,7 @@ <h2 id="returns">Returns</h2>
23870
23870
The method finds an element matching the specified selector within the page. If no elements match the selector, the
23871
23871
return value resolves to `null`.
23872
23872
23873
- Shortcut for main frame's `frame.$ ()`.
23873
+ Shortcut for main frame's `frame.query_selector ()`.
23874
23874
23875
23875
Parameters
23876
23876
----------
@@ -23901,7 +23901,7 @@ <h2 id="returns">Returns</h2>
23901
23901
<div class="desc"><p>Page.query_selector_all</p>
23902
23902
<p>The method finds all elements matching the specified selector within the page. If no elements match the selector, the
23903
23903
return value resolves to <code>[]</code>.</p>
23904
- <p>Shortcut for main frame's <code>frame.$$ ()</code>.</p>
23904
+ <p>Shortcut for main frame's <code>frame.query_selector_all ()</code>.</p>
23905
23905
<h2 id="parameters">Parameters</h2>
23906
23906
<dl>
23907
23907
<dt><strong><code>selector</code></strong> : <code>str</code></dt>
@@ -23922,7 +23922,7 @@ <h2 id="returns">Returns</h2>
23922
23922
The method finds all elements matching the specified selector within the page. If no elements match the selector, the
23923
23923
return value resolves to `[]`.
23924
23924
23925
- Shortcut for main frame's `frame.$$ ()`.
23925
+ Shortcut for main frame's `frame.query_selector_all ()`.
23926
23926
23927
23927
Parameters
23928
23928
----------
@@ -24416,7 +24416,7 @@ <h2 id="parameters">Parameters</h2>
24416
24416
- <code>page.goto()</code>
24417
24417
- <code>page.reload()</code>
24418
24418
- <code>page.set_content()</code>
24419
- - <code>page.wait_for_navigation ()</code></p>
24419
+ - <code>page.expect_navigation ()</code></p>
24420
24420
<blockquote>
24421
24421
<p>NOTE: <code>page.set_default_navigation_timeout()</code> takes priority over <code>page.set_default_timeout()</code>,
24422
24422
<code>browser_context.set_default_timeout()</code> and <code>browser_context.set_default_navigation_timeout()</code>.</p>
@@ -24439,7 +24439,7 @@ <h2 id="parameters">Parameters</h2>
24439
24439
- `page.goto()`
24440
24440
- `page.reload()`
24441
24441
- `page.set_content()`
24442
- - `page.wait_for_navigation ()`
24442
+ - `page.expect_navigation ()`
24443
24443
24444
24444
> NOTE: `page.set_default_navigation_timeout()` takes priority over `page.set_default_timeout()`,
24445
24445
`browser_context.set_default_timeout()` and `browser_context.set_default_navigation_timeout()`.
@@ -25132,7 +25132,7 @@ <h2 id="parameters">Parameters</h2>
25132
25132
<dd>
25133
25133
<div class="desc"><p>Page.wait_for_event</p>
25134
25134
<blockquote>
25135
- <p>NOTE: In most cases, you should use <code>page.wait_for_event ()</code>.</p>
25135
+ <p>NOTE: In most cases, you should use <code>page.expect_event ()</code>.</p>
25136
25136
</blockquote>
25137
25137
<p>Waits for given <code>event</code> to fire. If predicate is provided, it passes event's value into the <code>predicate</code> function and
25138
25138
waits for <code>predicate(event)</code> to return a truthy value. Will throw an error if the socket is closed before the <code>event</code> is
@@ -25161,7 +25161,7 @@ <h2 id="returns">Returns</h2>
25161
25161
) -> typing.Any:
25162
25162
"""Page.wait_for_event
25163
25163
25164
- > NOTE: In most cases, you should use `page.wait_for_event ()`.
25164
+ > NOTE: In most cases, you should use `page.expect_event ()`.
25165
25165
25166
25166
Waits for given `event` to fire. If predicate is provided, it passes event's value into the `predicate` function and
25167
25167
waits for `predicate(event)` to return a truthy value. Will throw an error if the socket is closed before the `event` is
@@ -28365,7 +28365,7 @@ <h3>Class variables</h3>
28365
28365
) -> typing.Any:
28366
28366
"""WebSocket.wait_for_event
28367
28367
28368
- > NOTE: In most cases, you should use `web_socket.wait_for_event ()`.
28368
+ > NOTE: In most cases, you should use `web_socket.expect_event ()`.
28369
28369
28370
28370
Waits for given `event` to fire. If predicate is provided, it passes event's value into the `predicate` function and
28371
28371
waits for `predicate(event)` to return a truthy value. Will throw an error if the socket is closed before the `event` is
@@ -28553,7 +28553,7 @@ <h2 id="returns">Returns</h2>
28553
28553
<dd>
28554
28554
<div class="desc"><p>WebSocket.wait_for_event</p>
28555
28555
<blockquote>
28556
- <p>NOTE: In most cases, you should use <code>web_socket.wait_for_event ()</code>.</p>
28556
+ <p>NOTE: In most cases, you should use <code>web_socket.expect_event ()</code>.</p>
28557
28557
</blockquote>
28558
28558
<p>Waits for given <code>event</code> to fire. If predicate is provided, it passes event's value into the <code>predicate</code> function and
28559
28559
waits for <code>predicate(event)</code> to return a truthy value. Will throw an error if the socket is closed before the <code>event</code> is
@@ -28582,7 +28582,7 @@ <h2 id="returns">Returns</h2>
28582
28582
) -> typing.Any:
28583
28583
"""WebSocket.wait_for_event
28584
28584
28585
- > NOTE: In most cases, you should use `web_socket.wait_for_event ()`.
28585
+ > NOTE: In most cases, you should use `web_socket.expect_event ()`.
28586
28586
28587
28587
Waits for given `event` to fire. If predicate is provided, it passes event's value into the `predicate` function and
28588
28588
waits for `predicate(event)` to return a truthy value. Will throw an error if the socket is closed before the `event` is
0 commit comments