diff --git a/docs/api.md b/docs/api.md
index 31568e6903..b52d700685 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -85,7 +85,6 @@
* [page.accessibility](#pageaccessibility)
* [page.addScriptTag(options)](#pageaddscripttagoptions)
* [page.addStyleTag(options)](#pageaddstyletagoptions)
- * [page.browser()](#pagebrowser)
* [page.browserContext()](#pagebrowsercontext)
* [page.click(selector[, options])](#pageclickselector-options)
* [page.close([options])](#pagecloseoptions)
@@ -96,8 +95,8 @@
* [page.evaluateHandle(pageFunction[, ...args])](#pageevaluatehandlepagefunction-args)
* [page.evaluateOnNewDocument(pageFunction[, ...args])](#pageevaluateonnewdocumentpagefunction-args)
* [page.exposeFunction(name, playwrightFunction)](#pageexposefunctionname-playwrightfunction)
- * [page.fill(selector, value)](#pagefillselector-value)
- * [page.focus(selector)](#pagefocusselector)
+ * [page.fill(selector, value, options)](#pagefillselector-value-options)
+ * [page.focus(selector, options)](#pagefocusselector-options)
* [page.frames()](#pageframes)
* [page.goBack([options])](#pagegobackoptions)
* [page.goForward([options])](#pagegoforwardoptions)
@@ -122,18 +121,15 @@
* [page.type(selector, text[, options])](#pagetypeselector-text-options)
* [page.url()](#pageurl)
* [page.waitFor(selectorOrFunctionOrTimeout[, options[, ...args]])](#pagewaitforselectororfunctionortimeout-options-args)
- * [page.waitForFileChooser([options])](#pagewaitforfilechooseroptions)
* [page.waitForFunction(pageFunction[, options[, ...args]])](#pagewaitforfunctionpagefunction-options-args)
* [page.waitForNavigation([options])](#pagewaitfornavigationoptions)
* [page.waitForRequest(urlOrPredicate[, options])](#pagewaitforrequesturlorpredicate-options)
* [page.waitForResponse(urlOrPredicate[, options])](#pagewaitforresponseurlorpredicate-options)
* [page.waitForSelector(selector[, options])](#pagewaitforselectorselector-options)
- * [page.waitForXPath(xpath[, options])](#pagewaitforxpathxpath-options)
* [page.workers](#pageworkers)
- [class: ChromiumWorker](#class-chromiumworker)
* [chromiumWorker.evaluate(pageFunction[, ...args])](#chromiumworkerevaluatepagefunction-args)
* [chromiumWorker.evaluateHandle(pageFunction[, ...args])](#chromiumworkerevaluatehandlepagefunction-args)
- * [chromiumWorker.executionContext()](#chromiumworkerexecutioncontext)
* [chromiumWorker.url()](#chromiumworkerurl)
- [class: ChromiumWorkers](#class-chromiumworkers)
* [event: 'workercreated'](#event-workercreated)
@@ -183,15 +179,14 @@
* [frame.dblclick(selector[, options])](#framedblclickselector-options)
* [frame.evaluate(pageFunction[, ...args])](#frameevaluatepagefunction-args)
* [frame.evaluateHandle(pageFunction[, ...args])](#frameevaluatehandlepagefunction-args)
- * [frame.executionContext()](#frameexecutioncontext)
- * [frame.fill(selector, value)](#framefillselector-value)
- * [frame.focus(selector)](#framefocusselector)
+ * [frame.fill(selector, value, options)](#framefillselector-value-options)
+ * [frame.focus(selector, options)](#framefocusselector-options)
* [frame.goto(url[, options])](#framegotourl-options)
* [frame.hover(selector[, options])](#framehoverselector-options)
* [frame.isDetached()](#frameisdetached)
* [frame.name()](#framename)
* [frame.parentFrame()](#frameparentframe)
- * [frame.select(selector, ...values)](#frameselectselector-values)
+ * [frame.select(selector, values, options)](#frameselectselector-values-options)
* [frame.setContent(html[, options])](#framesetcontenthtml-options)
* [frame.title()](#frametitle)
* [frame.tripleclick(selector[, options])](#frametripleclickselector-options)
@@ -201,7 +196,6 @@
* [frame.waitForFunction(pageFunction[, options[, ...args]])](#framewaitforfunctionpagefunction-options-args)
* [frame.waitForNavigation([options])](#framewaitfornavigationoptions)
* [frame.waitForSelector(selector[, options])](#framewaitforselectorselector-options)
- * [frame.waitForXPath(xpath[, options])](#framewaitforxpathxpath-options)
- [class: ChromiumInterception](#class-chromiuminterception)
* [chromiumInterception.abort(request, [errorCode])](#chromiuminterceptionabortrequest-errorcode)
* [chromiumInterception.authenticate(credentials)](#chromiuminterceptionauthenticatecredentials)
@@ -215,7 +209,6 @@
* [jsHandle.dispose()](#jshandledispose)
* [jsHandle.evaluate(pageFunction[, ...args])](#jshandleevaluatepagefunction-args)
* [jsHandle.evaluateHandle(pageFunction[, ...args])](#jshandleevaluatehandlepagefunction-args)
- * [jsHandle.executionContext()](#jshandleexecutioncontext)
* [jsHandle.getProperties()](#jshandlegetproperties)
* [jsHandle.getProperty(propertyName)](#jshandlegetpropertypropertyname)
* [jsHandle.jsonValue()](#jshandlejsonvalue)
@@ -1071,12 +1064,6 @@ Adds a `` tag into the page with the desired url or a `
-
-Get the browser the page belongs to.
-
#### page.browserContext()
- returns: <[BrowserContext]>
@@ -1092,7 +1079,10 @@ Get the browser context that the page belongs to.
- `relativePoint` <[Object]> A point to click relative to the top-left corner of element padding box. If not specified, clicks to some visible point of the element.
- 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.
+ - `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` <"visible"|"hidden"|"any"|"nowait"> Wait for element to become visible (`visible`), hidden (`hidden`), present in dom (`any`) or do not wait at all (`nowait`). Defaults to `visible`.
+ - `timeout` <[number]> Maximum navigation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by using the [page.setDefaultTimeout(timeout)](#pagesetdefaulttimeouttimeout) method.
- 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`.
This method fetches an element with `selector`, scrolls it into view if needed, and then uses [page.mouse](#pagemouse) to click in the center of the element.
@@ -1139,6 +1129,8 @@ Gets the full HTML contents of the page, 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` <"visible"|"hidden"|"any"|"nowait"> Wait for element to become visible (`visible`), hidden (`hidden`), present in dom (`any`) or do not wait at all (`nowait`). Defaults to `visible`.
+ - `timeout` <[number]> Maximum navigation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by using the [page.setDefaultTimeout(timeout)](#pagesetdefaulttimeouttimeout) method.
- 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`.
This method fetches an element with `selector`, scrolls it into view if needed, and then uses [page.mouse](#pagemouse) to double click in the center of the element.
@@ -1205,8 +1197,6 @@ console.log(await resultHandle.jsonValue());
await resultHandle.dispose();
```
-Shortcut for [page.mainFrame().executionContext().evaluateHandle(pageFunction, ...args)](#executioncontextevaluatehandlepagefunction-args).
-
#### page.evaluateOnNewDocument(pageFunction[, ...args])
- `pageFunction` <[function]|[string]> Function to be evaluated in browser context
- `...args` <...[Serializable]> Arguments to pass to `pageFunction`
@@ -1300,9 +1290,12 @@ const fs = require('fs');
})();
```
-#### page.fill(selector, value)
+#### page.fill(selector, value, options)
- `selector` <[string]> A selector to query page for.
- `value` <[string]> Value to fill for the ``, `