diff --git a/docs/api.md b/docs/api.md index 7431627b6d550..4cdbd3dd6c72a 100644 --- a/docs/api.md +++ b/docs/api.md @@ -71,7 +71,7 @@ This object can be used to launch or connect to Chromium, returning instances of #### playwright.devices - returns: <[Object]> -Returns a list of devices to be used with [`browser.newContext(options)`](#browsernewcontextoptions) or [`browser.newPage(options)`](#browsernewpageoptions). Actual list of devices can be found in [src/deviceDescriptors.ts](https://github.com/Microsoft/playwright/blob/master/src/deviceDescriptors.ts). +Returns a list of devices to be used with [`browser.newContext([options])`](#browsernewcontextoptions) or [`browser.newPage([options])`](#browsernewpageoptions). Actual list of devices can be found in [src/deviceDescriptors.ts](https://github.com/Microsoft/playwright/blob/master/src/deviceDescriptors.ts). ```js const { webkit, devices } = require('playwright'); @@ -145,14 +145,14 @@ const { firefox } = require('playwright'); // Or 'chromium' or 'webkit'. })(); ``` -See [ChromiumBrowser], [FirefoxBrowser] and [WebKitBrowser] for browser-specific features. Note that [browserType.connect(options)](#browsertypeconnectoptions) and [browserType.launch(options)](#browsertypelaunchoptions) always return a specific browser instance, based on the browser being connected to or launched. +See [ChromiumBrowser], [FirefoxBrowser] and [WebKitBrowser] for browser-specific features. Note that [browserType.connect(options)](#browsertypeconnectoptions) and [browserType.launch([options])](#browsertypelaunchoptions) always return a specific browser instance, based on the browser being connected to or launched. - [event: 'disconnected'](#event-disconnected) - [browser.close()](#browserclose) - [browser.contexts()](#browsercontexts) - [browser.isConnected()](#browserisconnected) -- [browser.newContext(options)](#browsernewcontextoptions) +- [browser.newContext([options])](#browsernewcontextoptions) - [browser.newPage([options])](#browsernewpageoptions) @@ -182,7 +182,7 @@ a single instance of [BrowserContext]. Indicates that the browser is connected. -#### browser.newContext(options) +#### browser.newContext([options]) - `options` <[Object]> - `ignoreHTTPSErrors` Whether to ignore HTTPS errors during navigation. Defaults to `false`. - `bypassCSP` Toggles bypassing page's Content-Security-Policy. @@ -604,8 +604,8 @@ page.removeListener('request', logRequest); - [page.evaluate(pageFunction[, ...args])](#pageevaluatepagefunction-args) - [page.evaluateHandle(pageFunction[, ...args])](#pageevaluatehandlepagefunction-args) - [page.exposeFunction(name, playwrightFunction)](#pageexposefunctionname-playwrightfunction) -- [page.fill(selector, value, options)](#pagefillselector-value-options) -- [page.focus(selector, options)](#pagefocusselector-options) +- [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) @@ -620,7 +620,7 @@ page.removeListener('request', logRequest); - [page.reload([options])](#pagereloadoptions) - [page.route(url, handler)](#pagerouteurl-handler) - [page.screenshot([options])](#pagescreenshotoptions) -- [page.select(selector, value, options)](#pageselectselector-value-options) +- [page.select(selector, value[, options])](#pageselectselector-value-options) - [page.setCacheEnabled([enabled])](#pagesetcacheenabledenabled) - [page.setContent(html[, options])](#pagesetcontenthtml-options) - [page.setDefaultNavigationTimeout(timeout)](#pagesetdefaultnavigationtimeouttimeout) @@ -1135,7 +1135,7 @@ const fs = require('fs'); })(); ``` -#### page.fill(selector, value, options) +#### page.fill(selector, value[, options]) - `selector` <[string]> A selector to query page for. - `value` <[string]> Value to fill for the ``, `