|
|
|
|
@ -913,7 +913,11 @@ Shortcut for [page.mainFrame().addStyleTag(options)](#frameaddstyletagoptions).
|
|
|
|
|
#### page.check(selector, [options])
|
|
|
|
|
- `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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -939,7 +943,11 @@ Shortcut for [page.mainFrame().check(selector[, options])](#framecheckselector-o
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -994,7 +1002,11 @@ Browser-specific Coverage implementation, only available for Chromium atm. See [
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -1173,7 +1185,6 @@ const fs = require('fs');
|
|
|
|
|
- `selector` <[string]> A selector to query page for.
|
|
|
|
|
- `value` <[string]> Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to be present in the dom. Defaults to `true`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -1194,7 +1205,6 @@ Shortcut for [page.mainFrame().fill()](#framefillselector-value)
|
|
|
|
|
#### page.focus(selector[, options])
|
|
|
|
|
- `selector` <[string]> A selector of an element to focus. If there are multiple elements satisfying the selector, the first will be focused.
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to be present in the dom. Defaults to `true`.
|
|
|
|
|
- `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 focused. The promise will be rejected if there is no element matching `selector`.
|
|
|
|
|
|
|
|
|
|
@ -1285,7 +1295,11 @@ Shortcut for [page.mainFrame().goto(url[, options])](#framegotourl-options)
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- y <[number]>
|
|
|
|
|
- `modifiers` <[Array]<"Alt"|"Control"|"Meta"|"Shift">> Modifier keys to press. Ensures that only these modifiers are pressed during the hover, 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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 hovered. Promise gets rejected if there's no element matching `selector`.
|
|
|
|
|
|
|
|
|
|
@ -1391,7 +1405,6 @@ The `format` options are:
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `text` <[string]> If specified, generates an input event with this text.
|
|
|
|
|
- `delay` <[number]> Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to be present in the dom. Defaults to `true`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -1472,7 +1485,6 @@ await browser.close();
|
|
|
|
|
- `label` <[string]> Matches by `option.label`.
|
|
|
|
|
- `index` <[number]> Matches by the index.
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to be present in the dom. Defaults to `true`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -1576,7 +1588,11 @@ Shortcut for [page.mainFrame().title()](#frametitle).
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- y <[number]>
|
|
|
|
|
- `modifiers` <[Array]<"Alt"|"Control"|"Meta"|"Shift">> Modifier keys to press. Ensures that only these modifiers are pressed during the triple 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -1601,7 +1617,6 @@ Shortcut for [page.mainFrame().tripleclick(selector[, options])](#frametriplecli
|
|
|
|
|
- `text` <[string]> A text to type into a focused element.
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `delay` <[number]> Time to wait between key presses in milliseconds. Defaults to 0.
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to be present in the dom. Defaults to `true`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -1626,7 +1641,11 @@ Shortcut for [page.mainFrame().type(selector, text[, options])](#frametypeselect
|
|
|
|
|
#### page.uncheck(selector, [options])
|
|
|
|
|
- `selector` <[string]> A selector to search for uncheckbox 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -1987,7 +2006,11 @@ Adds a `<link rel="stylesheet">` tag into the page with the desired url or a `<s
|
|
|
|
|
#### frame.check(selector, [options])
|
|
|
|
|
- `selector` <[string]> A selector to search for checkbox 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2014,7 +2037,11 @@ If there's no element matching `selector`, the method throws an error.
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2042,7 +2069,11 @@ Gets the full HTML contents of the frame, including the doctype.
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2121,7 +2152,6 @@ await resultHandle.dispose();
|
|
|
|
|
- `selector` <[string]> A selector to query page for.
|
|
|
|
|
- `value` <[string]> Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to be present in the dom. Defaults to `true`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2138,7 +2168,6 @@ If there's no text `<input>`, `<textarea>` or `[contenteditable]` element matchi
|
|
|
|
|
#### frame.focus(selector[, options])
|
|
|
|
|
- `selector` <[string]> A selector of an element to focus. If there are multiple elements satisfying the selector, the first will be focused.
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to be present in the dom. Defaults to `true`.
|
|
|
|
|
- `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 focused. The promise will be rejected if there is no element matching `selector`.
|
|
|
|
|
|
|
|
|
|
@ -2192,7 +2221,11 @@ console.log(frame === contentFrame); // -> true
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- y <[number]>
|
|
|
|
|
- `modifiers` <[Array]<"Alt"|"Control"|"Meta"|"Shift">> Modifier keys to press. Ensures that only these modifiers are pressed during the hover, 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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 hovered. Promise gets rejected if there's no element matching `selector`.
|
|
|
|
|
|
|
|
|
|
@ -2222,7 +2255,6 @@ If the name is empty, returns the id attribute instead.
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `text` <[string]> If specified, generates an input event with this text.
|
|
|
|
|
- `delay` <[number]> Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to be present in the dom. Defaults to `true`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2246,7 +2278,6 @@ If `key` is a single character and no modifier keys besides `Shift` are being he
|
|
|
|
|
- `label` <[string]> Matches by `option.label`.
|
|
|
|
|
- `index` <[number]> Matches by the index.
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to be present in the dom. Defaults to `true`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2298,7 +2329,11 @@ frame.select('select#colors', { value: 'blue' }, { index: 2 }, 'red');
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- y <[number]>
|
|
|
|
|
- `modifiers` <[Array]<"Alt"|"Control"|"Meta"|"Shift">> Modifier keys to press. Ensures that only these modifiers are pressed during the triple 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2321,7 +2356,6 @@ Bear in mind that if the first or second click of the `tripleclick()` triggers a
|
|
|
|
|
- `text` <[string]> A text to type into a focused element.
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `delay` <[number]> Time to wait between key presses in milliseconds. Defaults to 0.
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to be present in the dom. Defaults to `true`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2344,7 +2378,11 @@ await frame.type('#mytextarea', 'World', {delay: 100}); // Types slower, like a
|
|
|
|
|
#### frame.uncheck(selector, [options])
|
|
|
|
|
- `selector` <[string]> A selector to search for uncheckbox 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2615,7 +2653,11 @@ This method returns the bounding box of the element (relative to the main frame)
|
|
|
|
|
|
|
|
|
|
#### elementHandle.check([options])
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2637,7 +2679,11 @@ If element is not already checked, it scrolls it into view if needed, and then u
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- 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 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2662,7 +2708,11 @@ If the element is detached from DOM, the method throws an error.
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- 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 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2707,7 +2757,11 @@ Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- y <[number]>
|
|
|
|
|
- `modifiers` <[Array]<"Alt"|"Control"|"Meta"|"Shift">> Modifier keys to press. Ensures that only these modifiers are pressed during the hover, and then restores current modifiers back. If not specified, currently pressed modifiers are used.
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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 is successfully hovered.
|
|
|
|
|
|
|
|
|
|
@ -2812,7 +2866,11 @@ Sets the value of the file input to these file paths or files. If some of the `
|
|
|
|
|
- x <[number]>
|
|
|
|
|
- y <[number]>
|
|
|
|
|
- `modifiers` <[Array]<"Alt"|"Control"|"Meta"|"Shift">> Modifier keys to press. Ensures that only these modifiers are pressed during the triple click, and then restores current modifiers back. If not specified, currently pressed modifiers are used.
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
@ -2862,7 +2920,11 @@ await elementHandle.press('Enter');
|
|
|
|
|
|
|
|
|
|
#### elementHandle.uncheck([options])
|
|
|
|
|
- `options` <[Object]>
|
|
|
|
|
- `waitFor` <[boolean]> Whether to wait for the element to 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`.
|
|
|
|
|
- `force` <[boolean]> Whether to bypass the actionability checks. By default actions wait until the element is:
|
|
|
|
|
- displayed (for example, no `display:none`),
|
|
|
|
|
- is not moving (for example, waits until css transition finishes),
|
|
|
|
|
- receives pointer events at the action point (for example, waits until element becomes non-obscured by other elements).
|
|
|
|
|
Even if the action is forced, it will wait for the element matching selector to be in DOM. Defaults to `false`.
|
|
|
|
|
- `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.
|
|
|
|
|
|