diff --git a/docs/api.md b/docs/api.md index d04d5c5e88..f607fb0d2f 100644 --- a/docs/api.md +++ b/docs/api.md @@ -914,12 +914,13 @@ Shortcut for [page.mainFrame().addStyleTag(options)](#frameaddstyletagoptions). - `selector` <[string]> A selector to search for checkbox or radio button to check. If there are multiple elements satisfying the selector, the first will be checked. - `options` <[Object]> - `waitFor` <[boolean]> Whether to wait for the element to be present in the dom and displayed (for example, no `display:none`), stop moving (for example, wait until css transition finishes) and potentially receive pointer events at the click point (for example, wait until element becomes non-obscured by other elements). Defaults to `true`. - - `waitUntil` <"commit"|"load"|"domcontentloaded"|"networkidle0"|"networkidle2"> When to consider navigation succeeded, defaults to `commit`. Events can be either: + - `waitUntil` <"commit"|"load"|"domcontentloaded"|"networkidle0"|"networkidle2"|"nowait"> Actions that cause navigations are waiting for those navigations to `commit` by default. This behavior can be changed to either wait for another load phase or to omit the waiting altogether using `nowait`: - `'commit'` - navigation is committed, new url is displayed in the browser address bar. - `'load'` - consider navigation to be finished when the `load` event is fired. - `'domcontentloaded'` - consider navigation to be finished when the `DOMContentLoaded` event is fired. - `'networkidle0'` - consider navigation to be finished when there are no more than 0 network connections for at least `500` ms. - `'networkidle2'` - consider navigation to be finished when there are no more than 2 network connections for at least `500` ms. + - `'nowait'` - do not wait. - `timeout` <[number]> Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by using the [browserContext.setDefaultTimeout(timeout)](#browsercontextsetdefaulttimeouttimeout) or [page.setDefaultTimeout(timeout)](#pagesetdefaulttimeouttimeout) methods. - returns: <[Promise]> Promise which resolves when the element matching `selector` is successfully checked. The Promise will be rejected if there is no element matching `selector`. @@ -939,12 +940,13 @@ Shortcut for [page.mainFrame().check(selector[, options])](#framecheckselector-o - y <[number]> - `modifiers` <[Array]<"Alt"|"Control"|"Meta"|"Shift">> Modifier keys to press. Ensures that only these modifiers are pressed during the click, and then restores current modifiers back. If not specified, currently pressed modifiers are used. - `waitFor` <[boolean]> Whether to wait for the element to be present in the dom and displayed (for example, no `display:none`), stop moving (for example, wait until css transition finishes) and potentially receive pointer events at the click point (for example, wait until element becomes non-obscured by other elements). Defaults to `true`. - - `waitUntil` <"commit"|"load"|"domcontentloaded"|"networkidle0"|"networkidle2"> When to consider navigation succeeded, defaults to `commit`. Events can be either: + - `waitUntil` <"commit"|"load"|"domcontentloaded"|"networkidle0"|"networkidle2"|"nowait"> Actions that cause navigations are waiting for those navigations to `commit` by default. This behavior can be changed to either wait for another load phase or to omit the waiting altogether using `nowait`: - `'commit'` - navigation is committed, new url is displayed in the browser address bar. - `'load'` - consider navigation to be finished when the `load` event is fired. - `'domcontentloaded'` - consider navigation to be finished when the `DOMContentLoaded` event is fired. - `'networkidle0'` - consider navigation to be finished when there are no more than 0 network connections for at least `500` ms. - `'networkidle2'` - consider navigation to be finished when there are no more than 2 network connections for at least `500` ms. + - `'nowait'` - do not wait. - `timeout` <[number]> Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by using the [browserContext.setDefaultTimeout(timeout)](#browsercontextsetdefaulttimeouttimeout) or [page.setDefaultTimeout(timeout)](#pagesetdefaulttimeouttimeout) methods. - returns: <[Promise]> Promise which resolves when the element matching `selector` is successfully clicked. The Promise will be rejected if there is no element matching `selector`. @@ -993,12 +995,13 @@ Browser-specific Coverage implementation, only available for Chromium atm. See [ - y <[number]> - `modifiers` <[Array]<"Alt"|"Control"|"Meta"|"Shift">> Modifier keys to press. Ensures that only these modifiers are pressed during the double click, and then restores current modifiers back. If not specified, currently pressed modifiers are used. - `waitFor` <[boolean]> Whether to wait for the element to be present in the dom and displayed (for example, no `display:none`), stop moving (for example, wait until css transition finishes) and potentially receive pointer events at the click point (for example, wait until element becomes non-obscured by other elements). Defaults to `true`. - - `waitUntil` <"commit"|"load"|"domcontentloaded"|"networkidle0"|"networkidle2"> When to consider navigation succeeded, defaults to `commit`. Events can be either: + - `waitUntil` <"commit"|"load"|"domcontentloaded"|"networkidle0"|"networkidle2"|"nowait"> Actions that cause navigations are waiting for those navigations to `commit` by default. This behavior can be changed to either wait for another load phase or to omit the waiting altogether using `nowait`: - `'commit'` - navigation is committed, new url is displayed in the browser address bar. - `'load'` - consider navigation to be finished when the `load` event is fired. - `'domcontentloaded'` - consider navigation to be finished when the `DOMContentLoaded` event is fired. - `'networkidle0'` - consider navigation to be finished when there are no more than 0 network connections for at least `500` ms. - `'networkidle2'` - consider navigation to be finished when there are no more than 2 network connections for at least `500` ms. + - `'nowait'` - do not wait. - `timeout` <[number]> Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by using the [browserContext.setDefaultTimeout(timeout)](#browsercontextsetdefaulttimeouttimeout) or [page.setDefaultTimeout(timeout)](#pagesetdefaulttimeouttimeout) methods. - returns: <[Promise]> Promise which resolves when the element matching `selector` is successfully double clicked. The Promise will be rejected if there is no element matching `selector`. @@ -1171,12 +1174,13 @@ const fs = require('fs'); - `value` <[string]> Value to fill for the ``, `