chore: discourage networkidle (#22247)

This commit is contained in:
Pavel Feldman 2023-04-06 13:00:34 -07:00 committed by GitHub
parent 09f072de09
commit 3400d62a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 26 deletions

View File

@ -4,7 +4,7 @@
When to consider operation succeeded, defaults to `load`. Events can be either:
* `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* `'load'` - consider operation to be finished when the `load` event is fired.
* `'networkidle'` - consider operation to be finished when there are no network connections for at least `500` ms.
* `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* `'commit'` - consider operation to be finished when network response is received and the document started loading.
## navigation-timeout
@ -767,7 +767,7 @@ Optional load state to wait for, defaults to `load`. If the state has been alrea
method resolves immediately. Can be one of:
* `'load'` - wait for the `load` event to be fired.
* `'domcontentloaded'` - wait for the `DOMContentLoaded` event to be fired.
* `'networkidle'` - wait until there are no network connections for at least `500` ms.
* `'networkidle'` - **DISCOURAGED** wait until there are no network connections for at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
## java-wait-for-event-callback
* langs: java

View File

@ -2801,8 +2801,8 @@ export interface Page {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/
@ -2831,8 +2831,8 @@ export interface Page {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/
@ -2885,8 +2885,8 @@ export interface Page {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/
@ -3503,8 +3503,8 @@ export interface Page {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/
@ -3812,8 +3812,8 @@ export interface Page {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/
@ -4443,7 +4443,8 @@ export interface Page {
* document, the method resolves immediately. Can be one of:
* - `'load'` - wait for the `load` event to be fired.
* - `'domcontentloaded'` - wait for the `DOMContentLoaded` event to be fired.
* - `'networkidle'` - wait until there are no network connections for at least `500` ms.
* - `'networkidle'` - **DISCOURAGED** wait until there are no network connections for at least `500` ms. Don't use
* this method for testing, rely on web assertions to assess readiness instead.
* @param options
*/
waitForLoadState(state?: "load"|"domcontentloaded"|"networkidle", options?: {
@ -4504,8 +4505,8 @@ export interface Page {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/
@ -4625,8 +4626,8 @@ export interface Page {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/
@ -6277,8 +6278,8 @@ export interface Frame {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/
@ -6886,8 +6887,8 @@ export interface Frame {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/
@ -7206,7 +7207,8 @@ export interface Frame {
* document, the method resolves immediately. Can be one of:
* - `'load'` - wait for the `load` event to be fired.
* - `'domcontentloaded'` - wait for the `DOMContentLoaded` event to be fired.
* - `'networkidle'` - wait until there are no network connections for at least `500` ms.
* - `'networkidle'` - **DISCOURAGED** wait until there are no network connections for at least `500` ms. Don't use
* this method for testing, rely on web assertions to assess readiness instead.
* @param options
*/
waitForLoadState(state?: "load"|"domcontentloaded"|"networkidle", options?: {
@ -7266,8 +7268,8 @@ export interface Frame {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/
@ -7313,8 +7315,8 @@ export interface Frame {
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500`
* ms.
* - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
* at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
* - `'commit'` - consider operation to be finished when network response is received and the document started
* loading.
*/