chore: normalize api markdown (#18942)
This commit is contained in:
parent
e1189a96b6
commit
3fb4b3bbf9
|
|
@ -5,14 +5,12 @@
|
|||
Playwright has **experimental** support for Android automation. This includes Chrome for Android and Android WebView.
|
||||
|
||||
*Requirements*
|
||||
|
||||
* Android device or AVD Emulator.
|
||||
* [ADB daemon](https://developer.android.com/studio/command-line/adb) running and authenticated with your device. Typically running `adb devices` is all you need to do.
|
||||
* [`Chrome 87`](https://play.google.com/store/apps/details?id=com.android.chrome) or newer installed on the device
|
||||
* "Enable command line on non-rooted devices" enabled in `chrome://flags`.
|
||||
|
||||
*Known limitations*
|
||||
|
||||
* Raw USB operation is not yet supported, so you need ADB.
|
||||
* Device needs to be awake to produce screenshots. Enabling "Stay awake" developer mode will help.
|
||||
* We didn't run all the tests against the device, so not everything works.
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@ Launches a process in the shell on the device and returns a socket to communicat
|
|||
* since: v1.9
|
||||
- `command` <[string]> Shell command to execute.
|
||||
|
||||
|
||||
## async method: AndroidDevice.pinchClose
|
||||
* since: v1.9
|
||||
|
||||
|
|
@ -344,7 +343,6 @@ Executes a shell command on the device and returns its output.
|
|||
|
||||
Shell command to execute.
|
||||
|
||||
|
||||
## async method: AndroidDevice.swipe
|
||||
* since: v1.9
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ Presses the [`param: key`].
|
|||
|
||||
Key to press.
|
||||
|
||||
|
||||
## async method: AndroidInput.swipe
|
||||
* since: v1.9
|
||||
|
||||
|
|
|
|||
|
|
@ -14,12 +14,16 @@ Creates new instances of [APIRequestContext].
|
|||
|
||||
### option: APIRequest.newContext.useragent = %%-context-option-useragent-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequest.newContext.extraHTTPHeaders = %%-context-option-extrahttpheaders-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequest.newContext.httpCredentials = %%-context-option-httpcredentials-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequest.newContext.proxy = %%-browser-option-proxy-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequest.newContext.ignoreHTTPSErrors = %%-context-option-ignorehttpserrors-%%
|
||||
* since: v1.16
|
||||
|
||||
|
|
@ -30,7 +34,6 @@ Creates new instances of [APIRequestContext].
|
|||
Maximum time in milliseconds to wait for the response. Defaults to
|
||||
`30000` (30 seconds). Pass `0` to disable timeout.
|
||||
|
||||
|
||||
### option: APIRequest.newContext.baseURL
|
||||
* since: v1.16
|
||||
- `baseURL` <[string]>
|
||||
|
|
|
|||
|
|
@ -137,30 +137,43 @@ context cookies from the response. The method will automatically follow redirect
|
|||
|
||||
### param: APIRequestContext.delete.url = %%-fetch-param-url-%%
|
||||
* since: v1.16
|
||||
|
||||
### param: APIRequestContext.delete.params = %%-java-csharp-fetch-params-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: APIRequestContext.delete.params = %%-js-python-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.delete.params = %%-csharp-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.delete.headers = %%-js-python-csharp-fetch-option-headers-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.delete.data = %%-js-python-csharp-fetch-option-data-%%
|
||||
* since: v1.17
|
||||
|
||||
### option: APIRequestContext.delete.form = %%-js-python-fetch-option-form-%%
|
||||
* since: v1.17
|
||||
|
||||
### option: APIRequestContext.delete.form = %%-csharp-fetch-option-form-%%
|
||||
* since: v1.17
|
||||
|
||||
### option: APIRequestContext.delete.multipart = %%-js-python-fetch-option-multipart-%%
|
||||
* since: v1.17
|
||||
|
||||
### option: APIRequestContext.delete.multipart = %%-csharp-fetch-option-multipart-%%
|
||||
* since: v1.17
|
||||
|
||||
### option: APIRequestContext.delete.timeout = %%-js-python-csharp-fetch-option-timeout-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.delete.failOnStatusCode = %%-js-python-csharp-fetch-option-failonstatuscode-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.delete.ignoreHTTPSErrors = %%-js-python-csharp-fetch-option-ignorehttpserrors-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.delete.maxRedirects = %%-js-python-csharp-fetch-option-maxredirects-%%
|
||||
* since: v1.26
|
||||
|
||||
|
|
@ -285,8 +298,10 @@ Target URL or Request to get all parameters from.
|
|||
|
||||
### param: APIRequestContext.fetch.params = %%-java-csharp-fetch-params-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: APIRequestContext.fetch.params = %%-js-python-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.fetch.params = %%-csharp-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
|
|
@ -300,22 +315,31 @@ If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/
|
|||
|
||||
### option: APIRequestContext.fetch.headers = %%-js-python-csharp-fetch-option-headers-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.fetch.data = %%-js-python-csharp-fetch-option-data-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.fetch.form = %%-js-python-fetch-option-form-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.fetch.form = %%-csharp-fetch-option-form-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.fetch.multipart = %%-js-python-fetch-option-multipart-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.fetch.multipart = %%-csharp-fetch-option-multipart-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.fetch.timeout = %%-js-python-csharp-fetch-option-timeout-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.fetch.failOnStatusCode = %%-js-python-csharp-fetch-option-failonstatuscode-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.fetch.ignoreHTTPSErrors = %%-js-python-csharp-fetch-option-ignorehttpserrors-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.fetch.maxRedirects = %%-js-python-csharp-fetch-option-maxredirects-%%
|
||||
* since: v1.26
|
||||
|
||||
|
|
@ -363,30 +387,43 @@ await request.GetAsync("https://example.com/api/getText", new() { Params = param
|
|||
|
||||
### param: APIRequestContext.get.url = %%-fetch-param-url-%%
|
||||
* since: v1.16
|
||||
|
||||
### param: APIRequestContext.get.params = %%-java-csharp-fetch-params-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: APIRequestContext.get.params = %%-js-python-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.get.params = %%-csharp-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.get.headers = %%-js-python-csharp-fetch-option-headers-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.get.data = %%-js-python-csharp-fetch-option-data-%%
|
||||
* since: v1.26
|
||||
|
||||
### option: APIRequestContext.get.form = %%-js-python-fetch-option-form-%%
|
||||
* since: v1.26
|
||||
|
||||
### option: APIRequestContext.get.form = %%-csharp-fetch-option-form-%%
|
||||
* since: v1.26
|
||||
|
||||
### option: APIRequestContext.get.multipart = %%-js-python-fetch-option-multipart-%%
|
||||
* since: v1.26
|
||||
|
||||
### option: APIRequestContext.get.multipart = %%-csharp-fetch-option-multipart-%%
|
||||
* since: v1.26
|
||||
|
||||
### option: APIRequestContext.get.timeout = %%-js-python-csharp-fetch-option-timeout-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.get.failOnStatusCode = %%-js-python-csharp-fetch-option-failonstatuscode-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.get.ignoreHTTPSErrors = %%-js-python-csharp-fetch-option-ignorehttpserrors-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.get.maxRedirects = %%-js-python-csharp-fetch-option-maxredirects-%%
|
||||
* since: v1.26
|
||||
|
||||
|
|
@ -400,30 +437,43 @@ context cookies from the response. The method will automatically follow redirect
|
|||
|
||||
### param: APIRequestContext.head.url = %%-fetch-param-url-%%
|
||||
* since: v1.16
|
||||
|
||||
### param: APIRequestContext.head.params = %%-java-csharp-fetch-params-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: APIRequestContext.head.params = %%-js-python-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.head.params = %%-csharp-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.head.headers = %%-js-python-csharp-fetch-option-headers-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.head.data = %%-js-python-csharp-fetch-option-data-%%
|
||||
* since: v1.26
|
||||
|
||||
### option: APIRequestContext.head.form = %%-js-python-fetch-option-form-%%
|
||||
* since: v1.26
|
||||
|
||||
### option: APIRequestContext.head.form = %%-csharp-fetch-option-form-%%
|
||||
* since: v1.26
|
||||
|
||||
### option: APIRequestContext.head.multipart = %%-js-python-fetch-option-multipart-%%
|
||||
* since: v1.26
|
||||
|
||||
### option: APIRequestContext.head.multipart = %%-csharp-fetch-option-multipart-%%
|
||||
* since: v1.26
|
||||
|
||||
### option: APIRequestContext.head.timeout = %%-js-python-csharp-fetch-option-timeout-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.head.failOnStatusCode = %%-js-python-csharp-fetch-option-failonstatuscode-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.head.ignoreHTTPSErrors = %%-js-python-csharp-fetch-option-ignorehttpserrors-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.head.maxRedirects = %%-js-python-csharp-fetch-option-maxredirects-%%
|
||||
* since: v1.26
|
||||
|
||||
|
|
@ -437,30 +487,43 @@ context cookies from the response. The method will automatically follow redirect
|
|||
|
||||
### param: APIRequestContext.patch.url = %%-fetch-param-url-%%
|
||||
* since: v1.16
|
||||
|
||||
### param: APIRequestContext.patch.params = %%-java-csharp-fetch-params-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: APIRequestContext.patch.params = %%-js-python-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.params = %%-csharp-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.headers = %%-js-python-csharp-fetch-option-headers-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.data = %%-js-python-csharp-fetch-option-data-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.form = %%-js-python-fetch-option-form-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.form = %%-csharp-fetch-option-form-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.multipart = %%-js-python-fetch-option-multipart-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.multipart = %%-csharp-fetch-option-multipart-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.timeout = %%-js-python-csharp-fetch-option-timeout-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.failOnStatusCode = %%-js-python-csharp-fetch-option-failonstatuscode-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.ignoreHTTPSErrors = %%-js-python-csharp-fetch-option-ignorehttpserrors-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.patch.maxRedirects = %%-js-python-csharp-fetch-option-maxredirects-%%
|
||||
* since: v1.26
|
||||
|
||||
|
|
@ -602,30 +665,43 @@ await request.PostAsync("https://example.com/api/uploadScript", new() { Multipar
|
|||
|
||||
### param: APIRequestContext.post.url = %%-fetch-param-url-%%
|
||||
* since: v1.16
|
||||
|
||||
### param: APIRequestContext.post.params = %%-java-csharp-fetch-params-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: APIRequestContext.post.params = %%-js-python-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.params = %%-csharp-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.headers = %%-js-python-csharp-fetch-option-headers-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.data = %%-js-python-csharp-fetch-option-data-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.form = %%-js-python-fetch-option-form-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.form = %%-csharp-fetch-option-form-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.multipart = %%-js-python-fetch-option-multipart-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.multipart = %%-csharp-fetch-option-multipart-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.timeout = %%-js-python-csharp-fetch-option-timeout-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.failOnStatusCode = %%-js-python-csharp-fetch-option-failonstatuscode-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.ignoreHTTPSErrors = %%-js-python-csharp-fetch-option-ignorehttpserrors-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.post.maxRedirects = %%-js-python-csharp-fetch-option-maxredirects-%%
|
||||
* since: v1.26
|
||||
|
||||
|
|
@ -639,30 +715,43 @@ context cookies from the response. The method will automatically follow redirect
|
|||
|
||||
### param: APIRequestContext.put.url = %%-fetch-param-url-%%
|
||||
* since: v1.16
|
||||
|
||||
### param: APIRequestContext.put.params = %%-java-csharp-fetch-params-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: APIRequestContext.put.params = %%-js-python-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.params = %%-csharp-fetch-option-params-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.headers = %%-js-python-csharp-fetch-option-headers-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.data = %%-js-python-csharp-fetch-option-data-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.form = %%-js-python-fetch-option-form-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.form = %%-csharp-fetch-option-form-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.multipart = %%-js-python-fetch-option-multipart-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.multipart = %%-csharp-fetch-option-multipart-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.timeout = %%-js-python-csharp-fetch-option-timeout-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.failOnStatusCode = %%-js-python-csharp-fetch-option-failonstatuscode-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.ignoreHTTPSErrors = %%-js-python-csharp-fetch-option-ignorehttpserrors-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: APIRequestContext.put.maxRedirects = %%-js-python-csharp-fetch-option-maxredirects-%%
|
||||
* since: v1.26
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ def test_navigates_to_login_page(page: Page) -> None:
|
|||
expect(response).to_be_ok()
|
||||
```
|
||||
|
||||
|
||||
## property: APIResponseAssertions.not
|
||||
* since: v1.20
|
||||
* langs: java, js, csharp
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ Only works with Chromium browser's persistent context.
|
|||
|
||||
Emitted when new background page is created in the context.
|
||||
|
||||
|
||||
```js
|
||||
const backgroundPage = await context.waitForEvent('backgroundpage');
|
||||
```
|
||||
|
|
@ -1083,7 +1082,6 @@ Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerec
|
|||
### option: BrowserContext.routeFromHAR.notFound
|
||||
* since: v1.23
|
||||
- `notFound` ?<[HarNotFound]<"abort"|"fallback">>
|
||||
|
||||
* If set to 'abort' any request not found in the HAR file will be aborted.
|
||||
* If set to 'fallback' falls through to the next route handler in the handler chain.
|
||||
|
||||
|
|
@ -1380,7 +1378,9 @@ Will throw an error if the browser context is closed before the `event` is fired
|
|||
|
||||
### param: BrowserContext.waitForEvent2.event = %%-wait-for-event-event-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserContext.waitForEvent2.predicate = %%-wait-for-event-predicate-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserContext.waitForEvent2.timeout = %%-wait-for-event-timeout-%%
|
||||
* since: v1.8
|
||||
|
|
|
|||
|
|
@ -264,20 +264,25 @@ describes some differences for Linux users.
|
|||
|
||||
### option: BrowserType.launch.-inline- = %%-shared-browser-options-list-v1.8-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launch.firefoxUserPrefs = %%-js-python-browser-option-firefoxuserprefs-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launch.firefoxUserPrefs2 = %%-csharp-java-browser-option-firefoxuserprefs-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launch.logger = %%-browser-option-logger-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launch.slowMo = %%-browser-option-slowmo-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launch.ignoreDefaultArgs = %%-csharp-java-browser-option-ignoredefaultargs-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launch.ignoreAllDefaultArgs = %%-csharp-java-browser-option-ignorealldefaultargs-%%
|
||||
* since: v1.9
|
||||
|
||||
|
||||
## async method: BrowserType.launchPersistentContext
|
||||
* since: v1.8
|
||||
- returns: <[BrowserContext]>
|
||||
|
|
@ -299,12 +304,16 @@ use a temporary directory instead.
|
|||
|
||||
### option: BrowserType.launchPersistentContext.-inline- = %%-shared-browser-options-list-v1.8-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launchPersistentContext.slowMo = %%-browser-option-slowmo-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launchPersistentContext.ignoreDefaultArgs = %%-csharp-java-browser-option-ignoredefaultargs-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launchPersistentContext.ignoreAllDefaultArgs = %%-csharp-java-browser-option-ignorealldefaultargs-%%
|
||||
* since: v1.9
|
||||
|
||||
### option: BrowserType.launchPersistentContext.-inline- = %%-shared-context-params-list-v1.8-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -333,10 +342,13 @@ const { chromium } = require('playwright'); // Or 'webkit' or 'firefox'.
|
|||
|
||||
### option: BrowserType.launchServer.-inline- = %%-shared-browser-options-list-v1.8-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launchServer.firefoxUserPrefs = %%-js-python-browser-option-firefoxuserprefs-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launchServer.firefoxUserPrefs2 = %%-csharp-java-browser-option-firefoxuserprefs-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: BrowserType.launchServer.logger = %%-browser-option-logger-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
|
|||
|
|
@ -91,33 +91,48 @@ Maximum time in milliseconds to wait for the application to start. Defaults to `
|
|||
|
||||
### option: Electron.launch.acceptdownloads = %%-context-option-acceptdownloads-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.bypassCSP = %%-context-option-bypasscsp-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.colorScheme = %%-context-option-colorscheme-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.extraHTTPHeaders = %%-context-option-extrahttpheaders-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.geolocation = %%-context-option-geolocation-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.httpcredentials = %%-context-option-httpcredentials-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.ignoreHTTPSErrors = %%-context-option-ignorehttpserrors-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.locale = %%-context-option-locale-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.offline = %%-context-option-offline-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.recordhar = %%-context-option-recordhar-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.recordharpath = %%-context-option-recordhar-path-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.recordHarOmitContent = %%-context-option-recordhar-omit-content-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.recordvideo = %%-context-option-recordvideo-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.recordvideodir = %%-context-option-recordvideo-dir-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.recordvideosize = %%-context-option-recordvideo-size-%%
|
||||
* since: v1.12
|
||||
|
||||
### option: Electron.launch.timezoneId = %%-context-option-timezoneid-%%
|
||||
* since: v1.12
|
||||
|
|
|
|||
|
|
@ -504,8 +504,10 @@ Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.
|
|||
|
||||
### option: ElementHandle.fill.force = %%-input-force-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: ElementHandle.fill.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: ElementHandle.fill.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -785,10 +787,13 @@ await handle.SelectOptionAsync(new[] {
|
|||
|
||||
### param: ElementHandle.selectOption.values = %%-select-options-values-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: ElementHandle.selectOption.force = %%-input-force-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: ElementHandle.selectOption.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: ElementHandle.selectOption.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -802,6 +807,7 @@ If the element is inside the `<label>` element that has an associated [control](
|
|||
|
||||
### option: ElementHandle.selectText.force = %%-input-force-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: ElementHandle.selectText.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -823,14 +829,19 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### param: ElementHandle.setChecked.checked = %%-input-checked-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: ElementHandle.setChecked.force = %%-input-force-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: ElementHandle.setChecked.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: ElementHandle.setChecked.position = %%-input-position-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: ElementHandle.setChecked.timeout = %%-input-timeout-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: ElementHandle.setChecked.trial = %%-input-trial-%%
|
||||
* since: v1.15
|
||||
|
||||
|
|
@ -843,7 +854,6 @@ are resolved relative to the current working directory. For empty array, clears
|
|||
This method expects [ElementHandle] to point to an
|
||||
[input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside the `<label>` element that has an associated [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
|
||||
|
||||
|
||||
### param: ElementHandle.setInputFiles.files = %%-input-files-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
Error is raised whenever certain operations are terminated abnormally, e.g.
|
||||
browser closes while [`method: Page.evaluate`] is running. All Playwright exceptions
|
||||
inherit from this class.
|
||||
|
||||
- [error.message](./class-error.md#errormessage)
|
||||
- [error.name](./class-error.md#errorname)
|
||||
- [error.stack](./class-error.md#errorstack)
|
||||
|
|
|
|||
|
|
@ -209,14 +209,19 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Frame.check.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.check.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.check.position = %%-input-position-%%
|
||||
* since: v1.11
|
||||
|
||||
### option: Frame.check.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.check.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.check.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -224,7 +229,6 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
* since: v1.8
|
||||
- returns: <[Array]<[Frame]>>
|
||||
|
||||
|
||||
## async method: Frame.click
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -245,22 +249,31 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Frame.click.button = %%-input-button-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.click.clickCount = %%-input-click-count-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.click.delay = %%-input-down-up-delay-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.click.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.click.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.click.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.click.position = %%-input-position-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.click.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.click.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.click.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -297,20 +310,28 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Frame.dblclick.button = %%-input-button-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.dblclick.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.dblclick.delay = %%-input-down-up-delay-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.dblclick.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.dblclick.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.dblclick.position = %%-input-position-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.dblclick.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.dblclick.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.dblclick.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -406,6 +427,7 @@ Optional event-specific initialization properties.
|
|||
|
||||
### option: Frame.dispatchEvent.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.dispatchEvent.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -420,12 +442,16 @@ Optional event-specific initialization properties.
|
|||
|
||||
### option: Frame.dragAndDrop.force = %%-input-force-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Frame.dragAndDrop.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Frame.dragAndDrop.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.dragAndDrop.timeout = %%-input-timeout-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Frame.dragAndDrop.trial = %%-input-trial-%%
|
||||
* since: v1.13
|
||||
|
||||
|
|
@ -490,8 +516,10 @@ var html = await frame.EvalOnSelectorAsync(".main-container", "(e, suffix) => e.
|
|||
|
||||
### param: Frame.evalOnSelector.selector = %%-query-selector-%%
|
||||
* since: v1.9
|
||||
|
||||
### param: Frame.evalOnSelector.expression = %%-evaluate-expression-%%
|
||||
* since: v1.9
|
||||
|
||||
### param: Frame.evalOnSelector.arg
|
||||
* since: v1.9
|
||||
- `arg` ?<[EvaluationArgument]>
|
||||
|
|
@ -545,6 +573,7 @@ var divsCount = await frame.EvalOnSelectorAllAsync<bool>("div", "(divs, min) =>
|
|||
|
||||
### param: Frame.evalOnSelectorAll.selector = %%-query-selector-%%
|
||||
* since: v1.9
|
||||
|
||||
### param: Frame.evalOnSelectorAll.expression = %%-evaluate-expression-%%
|
||||
* since: v1.9
|
||||
|
||||
|
|
@ -788,10 +817,13 @@ Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.
|
|||
|
||||
### option: Frame.fill.force = %%-input-force-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Frame.fill.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.fill.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.fill.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -806,6 +838,7 @@ This method fetches an element with [`param: selector`] and focuses it. If there
|
|||
|
||||
### option: Frame.focus.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.focus.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -850,7 +883,6 @@ var contentFrame = await frameElement.ContentFrameAsync();
|
|||
Console.WriteLine(frame == contentFrame); // -> True
|
||||
```
|
||||
|
||||
|
||||
## method: Frame.frameLocator
|
||||
* since: v1.17
|
||||
- returns: <[FrameLocator]>
|
||||
|
|
@ -887,7 +919,6 @@ await locator.ClickAsync();
|
|||
### param: Frame.frameLocator.selector = %%-find-selector-%%
|
||||
* since: v1.17
|
||||
|
||||
|
||||
## async method: Frame.getAttribute
|
||||
* since: v1.8
|
||||
- returns: <[null]|[string]>
|
||||
|
|
@ -905,10 +936,10 @@ Attribute name to get the value for.
|
|||
|
||||
### option: Frame.getAttribute.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.getAttribute.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
||||
## method: Frame.getByAltText
|
||||
* since: v1.27
|
||||
- returns: <[Locator]>
|
||||
|
|
@ -916,8 +947,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-alt-text-%%
|
||||
|
||||
### param: Frame.getByAltText.text = %%-locator-get-by-text-text-%%
|
||||
### option: Frame.getByAltText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Frame.getByAltText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Frame.getByLabel
|
||||
* since: v1.27
|
||||
|
|
@ -926,8 +957,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-label-text-%%
|
||||
|
||||
### param: Frame.getByLabel.text = %%-locator-get-by-text-text-%%
|
||||
### option: Frame.getByLabel.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Frame.getByLabel.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Frame.getByPlaceholder
|
||||
* since: v1.27
|
||||
|
|
@ -936,8 +967,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-placeholder-text-%%
|
||||
|
||||
### param: Frame.getByPlaceholder.text = %%-locator-get-by-text-text-%%
|
||||
### option: Frame.getByPlaceholder.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Frame.getByPlaceholder.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Frame.getByRole
|
||||
* since: v1.27
|
||||
|
|
@ -945,12 +976,12 @@ Attribute name to get the value for.
|
|||
|
||||
%%-template-locator-get-by-role-%%
|
||||
|
||||
|
||||
### param: Frame.getByRole.role = %%-locator-get-by-role-role-%%
|
||||
|
||||
### option: Frame.getByRole.-inline- = %%-locator-get-by-role-option-list-v1.27-%%
|
||||
* since: v1.27
|
||||
### option: Frame.getByRole.exact = %%-locator-get-by-role-option-exact-%%
|
||||
|
||||
### option: Frame.getByRole.exact = %%-locator-get-by-role-option-exact-%%
|
||||
|
||||
## method: Frame.getByTestId
|
||||
* since: v1.27
|
||||
|
|
@ -961,7 +992,6 @@ Attribute name to get the value for.
|
|||
### param: Frame.getByTestId.testId = %%-locator-get-by-test-id-test-id-%%
|
||||
* since: v1.27
|
||||
|
||||
|
||||
## method: Frame.getByText
|
||||
* since: v1.27
|
||||
- returns: <[Locator]>
|
||||
|
|
@ -969,8 +999,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-text-%%
|
||||
|
||||
### param: Frame.getByText.text = %%-locator-get-by-text-text-%%
|
||||
### option: Frame.getByText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Frame.getByText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Frame.getByTitle
|
||||
* since: v1.27
|
||||
|
|
@ -979,8 +1009,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-title-%%
|
||||
|
||||
### param: Frame.getByTitle.text = %%-locator-get-by-text-text-%%
|
||||
### option: Frame.getByTitle.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Frame.getByTitle.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## async method: Frame.goto
|
||||
* since: v1.8
|
||||
|
|
@ -1051,16 +1081,22 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Frame.hover.position = %%-input-position-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.hover.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.hover.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.hover.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.hover.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.hover.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
### option: Frame.hover.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.28
|
||||
|
||||
|
|
@ -1075,6 +1111,7 @@ Returns `element.innerHTML`.
|
|||
|
||||
### option: Frame.innerHTML.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.innerHTML.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1089,6 +1126,7 @@ Returns `element.innerText`.
|
|||
|
||||
### option: Frame.innerText.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.innerText.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1105,6 +1143,7 @@ Throws for non-input elements. However, if the element is inside the `<label>` e
|
|||
|
||||
### option: Frame.inputValue.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.inputValue.timeout = %%-input-timeout-%%
|
||||
* since: v1.13
|
||||
|
||||
|
|
@ -1119,6 +1158,7 @@ Returns whether the element is checked. Throws if the element is not a checkbox
|
|||
|
||||
### option: Frame.isChecked.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.isChecked.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1139,6 +1179,7 @@ Returns whether the element is disabled, the opposite of [enabled](../actionabil
|
|||
|
||||
### option: Frame.isDisabled.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.isDisabled.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1153,6 +1194,7 @@ Returns whether the element is [editable](../actionability.md#editable).
|
|||
|
||||
### option: Frame.isEditable.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.isEditable.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1167,6 +1209,7 @@ Returns whether the element is [enabled](../actionability.md#enabled).
|
|||
|
||||
### option: Frame.isEnabled.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.isEnabled.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1181,6 +1224,7 @@ Returns whether the element is hidden, the opposite of [visible](../actionabilit
|
|||
|
||||
### option: Frame.isHidden.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.isHidden.timeout
|
||||
* since: v1.8
|
||||
- `timeout` <[float]>
|
||||
|
|
@ -1198,6 +1242,7 @@ Returns whether the element is [visible](../actionability.md#visible). [`option:
|
|||
|
||||
### option: Frame.isVisible.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.isVisible.timeout
|
||||
* since: v1.8
|
||||
- `timeout` <[float]>
|
||||
|
|
@ -1214,6 +1259,7 @@ Returns whether the element is [visible](../actionability.md#visible). [`option:
|
|||
|
||||
### param: Frame.locator.selector = %%-find-selector-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.locator.-inline- = %%-locator-options-list-v1.14-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -1279,8 +1325,10 @@ Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
|
|||
|
||||
### option: Frame.press.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.press.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.press.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1388,18 +1436,22 @@ await frame.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" })
|
|||
|
||||
### param: Frame.selectOption.selector = %%-query-selector-%%
|
||||
* since: v1.8
|
||||
|
||||
### param: Frame.selectOption.values = %%-select-options-values-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.selectOption.force = %%-input-force-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Frame.selectOption.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.selectOption.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.selectOption.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
||||
## async method: Frame.setChecked
|
||||
* since: v1.15
|
||||
|
||||
|
|
@ -1420,22 +1472,28 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### param: Frame.setChecked.selector = %%-input-selector-%%
|
||||
* since: v1.15
|
||||
|
||||
### param: Frame.setChecked.checked = %%-input-checked-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Frame.setChecked.force = %%-input-force-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Frame.setChecked.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Frame.setChecked.position = %%-input-position-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Frame.setChecked.strict = %%-input-strict-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Frame.setChecked.timeout = %%-input-timeout-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Frame.setChecked.trial = %%-input-trial-%%
|
||||
* since: v1.15
|
||||
|
||||
|
||||
## async method: Frame.setContent
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1462,12 +1520,16 @@ This method expects [`param: selector`] to point to an
|
|||
|
||||
### param: Frame.setInputFiles.selector = %%-input-selector-%%
|
||||
* since: v1.8
|
||||
|
||||
### param: Frame.setInputFiles.files = %%-input-files-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.setInputFiles.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.setInputFiles.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.setInputFiles.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1495,16 +1557,22 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Frame.tap.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.tap.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.tap.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.tap.position = %%-input-position-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.tap.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.tap.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.tap.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -1519,6 +1587,7 @@ Returns `element.textContent`.
|
|||
|
||||
### option: Frame.textContent.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.textContent.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1580,8 +1649,10 @@ Time to wait between key presses in milliseconds. Defaults to 0.
|
|||
|
||||
### option: Frame.type.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.type.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.type.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1608,14 +1679,19 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Frame.uncheck.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.uncheck.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.uncheck.position = %%-input-position-%%
|
||||
* since: v1.11
|
||||
|
||||
### option: Frame.uncheck.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.uncheck.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.uncheck.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -1978,10 +2054,13 @@ class FrameExamples
|
|||
|
||||
### param: Frame.waitForSelector.selector = %%-query-selector-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.waitForSelector.state = %%-wait-for-selector-state-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Frame.waitForSelector.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Frame.waitForSelector.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -2031,7 +2110,9 @@ await frame.WaitForURLAsync("**/target.html");
|
|||
|
||||
### param: Frame.waitForURL.url = %%-wait-for-navigation-url-%%
|
||||
* since: v1.11
|
||||
|
||||
### option: Frame.waitForURL.timeout = %%-navigation-timeout-%%
|
||||
* since: v1.11
|
||||
|
||||
### option: Frame.waitForURL.waitUntil = %%-navigation-wait-until-%%
|
||||
* since: v1.11
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ var frameLocator = locator.FrameLocator(":scope");
|
|||
|
||||
Returns locator to the first matching frame.
|
||||
|
||||
|
||||
## method: FrameLocator.frameLocator
|
||||
* since: v1.17
|
||||
- returns: <[FrameLocator]>
|
||||
|
|
@ -113,7 +112,6 @@ in that iframe.
|
|||
### param: FrameLocator.frameLocator.selector = %%-find-selector-%%
|
||||
* since: v1.17
|
||||
|
||||
|
||||
## method: FrameLocator.getByAltText
|
||||
* since: v1.27
|
||||
- returns: <[Locator]>
|
||||
|
|
@ -121,8 +119,8 @@ in that iframe.
|
|||
%%-template-locator-get-by-alt-text-%%
|
||||
|
||||
### param: FrameLocator.getByAltText.text = %%-locator-get-by-text-text-%%
|
||||
### option: FrameLocator.getByAltText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: FrameLocator.getByAltText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: FrameLocator.getByLabel
|
||||
* since: v1.27
|
||||
|
|
@ -131,8 +129,8 @@ in that iframe.
|
|||
%%-template-locator-get-by-label-text-%%
|
||||
|
||||
### param: FrameLocator.getByLabel.text = %%-locator-get-by-text-text-%%
|
||||
### option: FrameLocator.getByLabel.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: FrameLocator.getByLabel.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: FrameLocator.getByPlaceholder
|
||||
* since: v1.27
|
||||
|
|
@ -141,8 +139,8 @@ in that iframe.
|
|||
%%-template-locator-get-by-placeholder-text-%%
|
||||
|
||||
### param: FrameLocator.getByPlaceholder.text = %%-locator-get-by-text-text-%%
|
||||
### option: FrameLocator.getByPlaceholder.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: FrameLocator.getByPlaceholder.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: FrameLocator.getByRole
|
||||
* since: v1.27
|
||||
|
|
@ -151,10 +149,11 @@ in that iframe.
|
|||
%%-template-locator-get-by-role-%%
|
||||
|
||||
### param: FrameLocator.getByRole.role = %%-locator-get-by-role-role-%%
|
||||
|
||||
### option: FrameLocator.getByRole.-inline- = %%-locator-get-by-role-option-list-v1.27-%%
|
||||
* since: v1.27
|
||||
### option: FrameLocator.getByRole.exact = %%-locator-get-by-role-option-exact-%%
|
||||
|
||||
### option: FrameLocator.getByRole.exact = %%-locator-get-by-role-option-exact-%%
|
||||
|
||||
## method: FrameLocator.getByTestId
|
||||
* since: v1.27
|
||||
|
|
@ -165,7 +164,6 @@ in that iframe.
|
|||
### param: FrameLocator.getByTestId.testId = %%-locator-get-by-test-id-test-id-%%
|
||||
* since: v1.27
|
||||
|
||||
|
||||
## method: FrameLocator.getByText
|
||||
* since: v1.27
|
||||
- returns: <[Locator]>
|
||||
|
|
@ -173,8 +171,8 @@ in that iframe.
|
|||
%%-template-locator-get-by-text-%%
|
||||
|
||||
### param: FrameLocator.getByText.text = %%-locator-get-by-text-text-%%
|
||||
### option: FrameLocator.getByText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: FrameLocator.getByText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: FrameLocator.getByTitle
|
||||
* since: v1.27
|
||||
|
|
@ -183,8 +181,8 @@ in that iframe.
|
|||
%%-template-locator-get-by-title-%%
|
||||
|
||||
### param: FrameLocator.getByTitle.text = %%-locator-get-by-text-text-%%
|
||||
### option: FrameLocator.getByTitle.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: FrameLocator.getByTitle.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: FrameLocator.last
|
||||
* since: v1.17
|
||||
|
|
@ -192,7 +190,6 @@ in that iframe.
|
|||
|
||||
Returns locator to the last matching frame.
|
||||
|
||||
|
||||
## method: FrameLocator.locator
|
||||
* since: v1.17
|
||||
- returns: <[Locator]>
|
||||
|
|
@ -201,10 +198,10 @@ Returns locator to the last matching frame.
|
|||
|
||||
### param: FrameLocator.locator.selector = %%-find-selector-%%
|
||||
* since: v1.17
|
||||
|
||||
### option: FrameLocator.locator.-inline- = %%-locator-options-list-v1.14-%%
|
||||
* since: v1.17
|
||||
|
||||
|
||||
## method: FrameLocator.nth
|
||||
* since: v1.17
|
||||
- returns: <[FrameLocator]>
|
||||
|
|
|
|||
|
|
@ -94,12 +94,16 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Locator.check.position = %%-input-position-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.check.force = %%-input-force-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.check.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.check.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.check.trial = %%-input-trial-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -112,8 +116,10 @@ If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` e
|
|||
|
||||
### option: Locator.clear.force = %%-input-force-%%
|
||||
* since: v1.28
|
||||
|
||||
### option: Locator.clear.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.28
|
||||
|
||||
### option: Locator.clear.timeout = %%-input-timeout-%%
|
||||
* since: v1.28
|
||||
|
||||
|
|
@ -133,20 +139,28 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Locator.click.button = %%-input-button-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.click.clickCount = %%-input-click-count-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.click.delay = %%-input-down-up-delay-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.click.position = %%-input-position-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.click.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.click.force = %%-input-force-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.click.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.click.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.click.trial = %%-input-trial-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -179,18 +193,25 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Locator.dblclick.button = %%-input-button-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.dblclick.delay = %%-input-down-up-delay-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.dblclick.position = %%-input-position-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.dblclick.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.dblclick.force = %%-input-force-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.dblclick.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.dblclick.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.dblclick.trial = %%-input-trial-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -362,14 +383,19 @@ Locator of the element to drag to.
|
|||
|
||||
### option: Locator.dragTo.force = %%-input-force-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: Locator.dragTo.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: Locator.dragTo.timeout = %%-input-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: Locator.dragTo.trial = %%-input-trial-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: Locator.dragTo.sourcePosition = %%-input-source-position-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: Locator.dragTo.targetPosition = %%-input-target-position-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -484,7 +510,6 @@ var divsCount = await elements.EvaluateAll<bool>("(divs, min) => divs.length >=
|
|||
|
||||
Optional argument to pass to [`param: expression`].
|
||||
|
||||
|
||||
## async method: Locator.evaluateHandle
|
||||
* since: v1.14
|
||||
- returns: <[JSHandle]>
|
||||
|
|
@ -529,8 +554,10 @@ Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.
|
|||
|
||||
### option: Locator.fill.force = %%-input-force-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.fill.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.fill.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -549,6 +576,7 @@ await rowLocator
|
|||
.filter({ has: page.getByRole('button', { name: 'column 2 button' }) })
|
||||
.screenshot();
|
||||
```
|
||||
|
||||
```java
|
||||
Locator rowLocator = page.locator("tr");
|
||||
// ...
|
||||
|
|
@ -559,6 +587,7 @@ rowLocator
|
|||
))
|
||||
.screenshot();
|
||||
```
|
||||
|
||||
```python async
|
||||
row_locator = page.locator("tr")
|
||||
# ...
|
||||
|
|
@ -567,6 +596,7 @@ await row_locator
|
|||
.filter(has=page.get_by_role("button", name="column 2 button"))
|
||||
.screenshot()
|
||||
```
|
||||
|
||||
```python sync
|
||||
row_locator = page.locator("tr")
|
||||
# ...
|
||||
|
|
@ -575,6 +605,7 @@ row_locator
|
|||
.filter(has=page.get_by_role("button", name="column 2 button"))
|
||||
.screenshot()
|
||||
```
|
||||
|
||||
```csharp
|
||||
var rowLocator = page.Locator("tr");
|
||||
// ...
|
||||
|
|
@ -603,7 +634,6 @@ Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
|
|||
### option: Locator.focus.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
|
||||
## method: Locator.frameLocator
|
||||
* since: v1.17
|
||||
- returns: <[FrameLocator]>
|
||||
|
|
@ -639,7 +669,6 @@ await locator.ClickAsync();
|
|||
### param: Locator.frameLocator.selector = %%-find-selector-%%
|
||||
* since: v1.17
|
||||
|
||||
|
||||
## async method: Locator.getAttribute
|
||||
* since: v1.14
|
||||
- returns: <[null]|[string]>
|
||||
|
|
@ -655,7 +684,6 @@ Attribute name to get the value for.
|
|||
### option: Locator.getAttribute.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
|
||||
## method: Locator.getByAltText
|
||||
* since: v1.27
|
||||
- returns: <[Locator]>
|
||||
|
|
@ -663,8 +691,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-alt-text-%%
|
||||
|
||||
### param: Locator.getByAltText.text = %%-locator-get-by-text-text-%%
|
||||
### option: Locator.getByAltText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Locator.getByAltText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Locator.getByLabel
|
||||
* since: v1.27
|
||||
|
|
@ -673,8 +701,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-label-text-%%
|
||||
|
||||
### param: Locator.getByLabel.text = %%-locator-get-by-text-text-%%
|
||||
### option: Locator.getByLabel.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Locator.getByLabel.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Locator.getByPlaceholder
|
||||
* since: v1.27
|
||||
|
|
@ -683,8 +711,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-placeholder-text-%%
|
||||
|
||||
### param: Locator.getByPlaceholder.text = %%-locator-get-by-text-text-%%
|
||||
### option: Locator.getByPlaceholder.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Locator.getByPlaceholder.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Locator.getByRole
|
||||
* since: v1.27
|
||||
|
|
@ -693,10 +721,11 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-role-%%
|
||||
|
||||
### param: Locator.getByRole.role = %%-locator-get-by-role-role-%%
|
||||
|
||||
### option: Locator.getByRole.-inline- = %%-locator-get-by-role-option-list-v1.27-%%
|
||||
* since: v1.27
|
||||
### option: Locator.getByRole.exact = %%-locator-get-by-role-option-exact-%%
|
||||
|
||||
### option: Locator.getByRole.exact = %%-locator-get-by-role-option-exact-%%
|
||||
|
||||
## method: Locator.getByTestId
|
||||
* since: v1.27
|
||||
|
|
@ -707,7 +736,6 @@ Attribute name to get the value for.
|
|||
### param: Locator.getByTestId.testId = %%-locator-get-by-test-id-test-id-%%
|
||||
* since: v1.27
|
||||
|
||||
|
||||
## method: Locator.getByText
|
||||
* since: v1.27
|
||||
- returns: <[Locator]>
|
||||
|
|
@ -715,8 +743,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-text-%%
|
||||
|
||||
### param: Locator.getByText.text = %%-locator-get-by-text-text-%%
|
||||
### option: Locator.getByText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Locator.getByText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Locator.getByTitle
|
||||
* since: v1.27
|
||||
|
|
@ -725,8 +753,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-title-%%
|
||||
|
||||
### param: Locator.getByTitle.text = %%-locator-get-by-text-text-%%
|
||||
### option: Locator.getByTitle.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Locator.getByTitle.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## async method: Locator.highlight
|
||||
* since: v1.20
|
||||
|
|
@ -749,14 +777,19 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Locator.hover.position = %%-input-position-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.hover.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.hover.force = %%-input-force-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.hover.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.hover.trial = %%-input-trial-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.hover.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.28
|
||||
|
||||
|
|
@ -863,6 +896,7 @@ Returns locator to the last matching element.
|
|||
|
||||
### param: Locator.locator.selector = %%-find-selector-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.locator.-inline- = %%-locator-options-list-v1.14-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -1013,10 +1047,13 @@ await element.SelectOptionAsync(new[] {
|
|||
|
||||
### param: Locator.selectOption.values = %%-select-options-values-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.selectOption.force = %%-input-force-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.selectOption.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.selectOption.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -1030,6 +1067,7 @@ If the element is inside the `<label>` element that has an associated [control](
|
|||
|
||||
### option: Locator.selectText.force = %%-input-force-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.selectText.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -1051,14 +1089,19 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### param: Locator.setChecked.checked = %%-input-checked-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Locator.setChecked.force = %%-input-force-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Locator.setChecked.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Locator.setChecked.position = %%-input-position-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Locator.setChecked.timeout = %%-input-timeout-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Locator.setChecked.trial = %%-input-trial-%%
|
||||
* since: v1.15
|
||||
|
||||
|
|
@ -1073,8 +1116,10 @@ This method expects [Locator] to point to an
|
|||
|
||||
### param: Locator.setInputFiles.files = %%-input-files-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.setInputFiles.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.setInputFiles.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -1098,14 +1143,19 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Locator.tap.position = %%-input-position-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.tap.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.tap.force = %%-input-force-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.tap.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.tap.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.tap.trial = %%-input-trial-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -1196,6 +1246,7 @@ Time to wait between key presses in milliseconds. Defaults to 0.
|
|||
|
||||
### option: Locator.type.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.type.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -1218,12 +1269,16 @@ When all steps combined have not finished during the specified [`option: timeout
|
|||
|
||||
### option: Locator.uncheck.position = %%-input-position-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.uncheck.force = %%-input-force-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.uncheck.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.uncheck.timeout = %%-input-timeout-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Locator.uncheck.trial = %%-input-trial-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -1262,5 +1317,6 @@ orderSent.WaitForAsync();
|
|||
|
||||
### option: Locator.waitFor.state = %%-wait-for-selector-state-%%
|
||||
* since: v1.16
|
||||
|
||||
### option: Locator.waitFor.timeout = %%-input-timeout-%%
|
||||
* since: v1.16
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ The opposite of [`method: LocatorAssertions.toBeChecked`].
|
|||
|
||||
### option: LocatorAssertions.NotToBeChecked.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToBeChecked.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -105,6 +106,7 @@ The opposite of [`method: LocatorAssertions.toBeDisabled`].
|
|||
|
||||
### option: LocatorAssertions.NotToBeDisabled.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToBeDisabled.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -117,8 +119,10 @@ The opposite of [`method: LocatorAssertions.toBeEditable`].
|
|||
### option: LocatorAssertions.NotToBeEditable.editable
|
||||
* since: v1.26
|
||||
- `editable` <[boolean]>
|
||||
|
||||
### option: LocatorAssertions.NotToBeEditable.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToBeEditable.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -130,6 +134,7 @@ The opposite of [`method: LocatorAssertions.toBeEmpty`].
|
|||
|
||||
### option: LocatorAssertions.NotToBeEmpty.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToBeEmpty.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -142,8 +147,10 @@ The opposite of [`method: LocatorAssertions.toBeEnabled`].
|
|||
### option: LocatorAssertions.NotToBeEnabled.enabled
|
||||
* since: v1.26
|
||||
- `enabled` <[boolean]>
|
||||
|
||||
### option: LocatorAssertions.NotToBeEnabled.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToBeEnabled.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -155,6 +162,7 @@ The opposite of [`method: LocatorAssertions.toBeFocused`].
|
|||
|
||||
### option: LocatorAssertions.NotToBeFocused.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToBeFocused.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -166,6 +174,7 @@ The opposite of [`method: LocatorAssertions.toBeHidden`].
|
|||
|
||||
### option: LocatorAssertions.NotToBeHidden.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToBeHidden.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -178,12 +187,13 @@ The opposite of [`method: LocatorAssertions.toBeVisible`].
|
|||
### option: LocatorAssertions.NotToBeVisible.visible
|
||||
* since: v1.26
|
||||
- `visible` <[boolean]>
|
||||
|
||||
### option: LocatorAssertions.NotToBeVisible.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToBeVisible.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.NotToContainText
|
||||
* since: v1.20
|
||||
* langs: python
|
||||
|
|
@ -210,6 +220,7 @@ Whether to use `element.innerText` instead of `element.textContent` when retriev
|
|||
|
||||
### option: LocatorAssertions.NotToContainText.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToContainText.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -233,6 +244,7 @@ Expected attribute value.
|
|||
|
||||
### option: LocatorAssertions.NotToHaveAttribute.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToHaveAttribute.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -250,6 +262,7 @@ Expected class or RegExp or a list of those.
|
|||
|
||||
### option: LocatorAssertions.NotToHaveClass.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToHaveClass.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -267,6 +280,7 @@ Expected count.
|
|||
|
||||
### option: LocatorAssertions.NotToHaveCount.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToHaveCount.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -290,6 +304,7 @@ CSS property value.
|
|||
|
||||
### option: LocatorAssertions.NotToHaveCSS.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToHaveCSS.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -307,6 +322,7 @@ Element id.
|
|||
|
||||
### option: LocatorAssertions.NotToHaveId.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToHaveId.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -330,6 +346,7 @@ Property value.
|
|||
|
||||
### option: LocatorAssertions.NotToHaveJSProperty.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToHaveJSProperty.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -359,6 +376,7 @@ Whether to use `element.innerText` instead of `element.textContent` when retriev
|
|||
|
||||
### option: LocatorAssertions.NotToHaveText.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToHaveText.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -376,6 +394,7 @@ Expected value.
|
|||
|
||||
### option: LocatorAssertions.NotToHaveValue.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.NotToHaveValue.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -393,6 +412,7 @@ Expected options currently selected.
|
|||
|
||||
### option: LocatorAssertions.NotToHaveValues.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.NotToHaveValues.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.23
|
||||
|
||||
|
|
@ -437,10 +457,10 @@ await Expect(locator).ToBeCheckedAsync();
|
|||
|
||||
### option: LocatorAssertions.toBeChecked.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toBeChecked.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toBeDisabled
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -482,10 +502,10 @@ await Expect(locator).ToBeDisabledAsync();
|
|||
|
||||
### option: LocatorAssertions.toBeDisabled.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toBeDisabled.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toBeEditable
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -524,12 +544,13 @@ await Expect(locator).ToBeEditableAsync();
|
|||
### option: LocatorAssertions.toBeEditable.editable
|
||||
* since: v1.26
|
||||
- `editable` <[boolean]>
|
||||
|
||||
### option: LocatorAssertions.toBeEditable.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toBeEditable.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toBeEmpty
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -567,10 +588,10 @@ await Expect(locator).ToBeEmptyAsync();
|
|||
|
||||
### option: LocatorAssertions.toBeEmpty.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toBeEmpty.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toBeEnabled
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -609,12 +630,13 @@ await Expect(locator).toBeEnabledAsync();
|
|||
### option: LocatorAssertions.toBeEnabled.enabled
|
||||
* since: v1.26
|
||||
- `enabled` <[boolean]>
|
||||
|
||||
### option: LocatorAssertions.toBeEnabled.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toBeEnabled.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toBeFocused
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -652,10 +674,10 @@ await Expect(locator).ToBeFocusedAsync();
|
|||
|
||||
### option: LocatorAssertions.toBeFocused.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toBeFocused.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toBeHidden
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -693,10 +715,10 @@ await Expect(locator).ToBeHiddenAsync();
|
|||
|
||||
### option: LocatorAssertions.toBeHidden.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toBeHidden.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toBeVisible
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -735,8 +757,10 @@ await Expect(locator).ToBeVisibleAsync();
|
|||
### option: LocatorAssertions.toBeVisible.visible
|
||||
* since: v1.26
|
||||
- `visible` <[boolean]>
|
||||
|
||||
### option: LocatorAssertions.toBeVisible.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toBeVisible.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -788,6 +812,7 @@ If you pass an array as an expected value, the expectations are:
|
|||
1. Each text value from the expected array is matched by some element from the list.
|
||||
|
||||
For example, consider the following list:
|
||||
|
||||
```html
|
||||
<ul>
|
||||
<li>Item Text 1</li>
|
||||
|
|
@ -900,10 +925,10 @@ Whether to use `element.innerText` instead of `element.textContent` when retriev
|
|||
|
||||
### option: LocatorAssertions.toContainText.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toContainText.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toHaveAttribute
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -953,6 +978,7 @@ Expected attribute value.
|
|||
|
||||
### option: LocatorAssertions.toHaveAttribute.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toHaveAttribute.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -1047,10 +1073,10 @@ Expected class or RegExp or a list of those.
|
|||
|
||||
### option: LocatorAssertions.toHaveClass.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toHaveClass.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toHaveCount
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -1094,6 +1120,7 @@ Expected count.
|
|||
|
||||
### option: LocatorAssertions.toHaveCount.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toHaveCount.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -1146,6 +1173,7 @@ CSS property value.
|
|||
|
||||
### option: LocatorAssertions.toHaveCSS.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toHaveCSS.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -1192,10 +1220,10 @@ Element id.
|
|||
|
||||
### option: LocatorAssertions.toHaveId.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toHaveId.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toHaveJSProperty
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -1246,10 +1274,10 @@ Property value.
|
|||
|
||||
### option: LocatorAssertions.toHaveJSProperty.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toHaveJSProperty.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toHaveScreenshot#1
|
||||
* since: v1.23
|
||||
* langs: js
|
||||
|
|
@ -1270,21 +1298,28 @@ Snapshot name.
|
|||
|
||||
### option: LocatorAssertions.toHaveScreenshot#1.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#1.animations = %%-screenshot-option-animations-default-disabled-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#1.caret = %%-screenshot-option-caret-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#1.mask = %%-screenshot-option-mask-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#1.omitBackground = %%-screenshot-option-omit-background-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#1.scale = %%-screenshot-option-scale-default-css-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#1.maxDiffPixels = %%-assertions-max-diff-pixels-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#1.maxDiffPixelRatio = %%-assertions-max-diff-pixel-ratio-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#1.threshold = %%-assertions-threshold-%%
|
||||
* since: v1.23
|
||||
|
||||
|
|
@ -1302,25 +1337,31 @@ await expect(locator).toHaveScreenshot();
|
|||
|
||||
### option: LocatorAssertions.toHaveScreenshot#2.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#2.animations = %%-screenshot-option-animations-default-disabled-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#2.caret = %%-screenshot-option-caret-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#2.mask = %%-screenshot-option-mask-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#2.omitBackground = %%-screenshot-option-omit-background-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#2.scale = %%-screenshot-option-scale-default-css-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#2.maxDiffPixels = %%-assertions-max-diff-pixels-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#2.maxDiffPixelRatio = %%-assertions-max-diff-pixel-ratio-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveScreenshot#2.threshold = %%-assertions-threshold-%%
|
||||
* since: v1.23
|
||||
|
||||
|
||||
## async method: LocatorAssertions.toHaveText
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -1363,13 +1404,13 @@ await Expect(locator).ToHaveTextAsync(new Regex("Welcome, Test User"));
|
|||
await Expect(locator).ToHaveTextAsync(new Regex("Welcome, .*"));
|
||||
```
|
||||
|
||||
|
||||
If you pass an array as an expected value, the expectations are:
|
||||
1. Locator resolves to a list of elements.
|
||||
1. The number of elements equals the number of expected values in the array.
|
||||
1. Elements from the list have text matching expected array values, one by one, in order.
|
||||
|
||||
For example, consider the following list:
|
||||
|
||||
```html
|
||||
<ul>
|
||||
<li>Text 1</li>
|
||||
|
|
@ -1482,6 +1523,7 @@ Whether to use `element.innerText` instead of `element.textContent` when retriev
|
|||
|
||||
### option: LocatorAssertions.toHaveText.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toHaveText.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -1530,6 +1572,7 @@ Expected value.
|
|||
|
||||
### option: LocatorAssertions.toHaveValue.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: LocatorAssertions.toHaveValue.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -1601,5 +1644,6 @@ Expected options currently selected.
|
|||
|
||||
### option: LocatorAssertions.toHaveValues.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: LocatorAssertions.toHaveValues.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.23
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ await Page.Mouse.MoveAsync(100, 0);
|
|||
await Page.Mouse.MoveAsync(0, 0);
|
||||
await Page.Mouse.UpAsync();
|
||||
```
|
||||
|
||||
## async method: Mouse.click
|
||||
* since: v1.8
|
||||
|
||||
|
|
|
|||
|
|
@ -726,14 +726,19 @@ Shortcut for main frame's [`method: Frame.check`].
|
|||
|
||||
### option: Page.check.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.check.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.check.position = %%-input-position-%%
|
||||
* since: v1.11
|
||||
|
||||
### option: Page.check.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.check.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.check.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -759,22 +764,31 @@ Shortcut for main frame's [`method: Frame.click`].
|
|||
|
||||
### option: Page.click.button = %%-input-button-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.click.clickCount = %%-input-click-count-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.click.delay = %%-input-down-up-delay-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.click.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.click.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.click.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.click.position = %%-input-position-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.click.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.click.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.click.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -850,20 +864,28 @@ Shortcut for main frame's [`method: Frame.dblclick`].
|
|||
|
||||
### option: Page.dblclick.button = %%-input-button-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.dblclick.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.dblclick.delay = %%-input-down-up-delay-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.dblclick.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.dblclick.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.dblclick.position = %%-input-position-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.dblclick.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.dblclick.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.dblclick.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -958,6 +980,7 @@ Optional event-specific initialization properties.
|
|||
|
||||
### option: Page.dispatchEvent.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.dispatchEvent.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -1018,17 +1041,22 @@ await Page.DragAndDropAsync("#source", "#target", new()
|
|||
|
||||
### param: Page.dragAndDrop.source = %%-input-source-%%
|
||||
* since: v1.13
|
||||
|
||||
### param: Page.dragAndDrop.target = %%-input-target-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Page.dragAndDrop.force = %%-input-force-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Page.dragAndDrop.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Page.dragAndDrop.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.dragAndDrop.timeout = %%-input-timeout-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Page.dragAndDrop.trial = %%-input-trial-%%
|
||||
* since: v1.13
|
||||
|
||||
|
|
@ -1302,8 +1330,10 @@ Shortcut for main frame's [`method: Frame.evalOnSelector`].
|
|||
|
||||
### param: Page.evalOnSelector.selector = %%-query-selector-%%
|
||||
* since: v1.9
|
||||
|
||||
### param: Page.evalOnSelector.expression = %%-evaluate-expression-%%
|
||||
* since: v1.9
|
||||
|
||||
### param: Page.evalOnSelector.arg
|
||||
* since: v1.9
|
||||
- `arg` ?<[EvaluationArgument]>
|
||||
|
|
@ -1354,8 +1384,10 @@ var divsCount = await page.EvalOnSelectorAllAsync<bool>("div", "(divs, min) => d
|
|||
|
||||
### param: Page.evalOnSelectorAll.selector = %%-query-selector-%%
|
||||
* since: v1.9
|
||||
|
||||
### param: Page.evalOnSelectorAll.expression = %%-evaluate-expression-%%
|
||||
* since: v1.9
|
||||
|
||||
### param: Page.evalOnSelectorAll.arg
|
||||
* since: v1.9
|
||||
- `arg` ?<[EvaluationArgument]>
|
||||
|
|
@ -2026,10 +2058,13 @@ Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.
|
|||
|
||||
### option: Page.fill.force = %%-input-force-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Page.fill.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.fill.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.fill.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -2046,6 +2081,7 @@ Shortcut for main frame's [`method: Frame.focus`].
|
|||
|
||||
### option: Page.focus.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.focus.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -2118,7 +2154,6 @@ Returns frame with matching URL.
|
|||
|
||||
A glob pattern, regex pattern or predicate receiving frame's `url` as a [URL] object.
|
||||
|
||||
|
||||
## method: Page.frameLocator
|
||||
* since: v1.17
|
||||
- returns: <[FrameLocator]>
|
||||
|
|
@ -2155,7 +2190,6 @@ await locator.ClickAsync();
|
|||
### param: Page.frameLocator.selector = %%-find-selector-%%
|
||||
* since: v1.17
|
||||
|
||||
|
||||
## method: Page.frames
|
||||
* since: v1.8
|
||||
- returns: <[Array]<[Frame]>>
|
||||
|
|
@ -2179,10 +2213,10 @@ Attribute name to get the value for.
|
|||
|
||||
### option: Page.getAttribute.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.getAttribute.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
||||
## method: Page.getByAltText
|
||||
* since: v1.27
|
||||
- returns: <[Locator]>
|
||||
|
|
@ -2190,8 +2224,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-alt-text-%%
|
||||
|
||||
### param: Page.getByAltText.text = %%-locator-get-by-text-text-%%
|
||||
### option: Page.getByAltText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Page.getByAltText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Page.getByLabel
|
||||
* since: v1.27
|
||||
|
|
@ -2200,8 +2234,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-label-text-%%
|
||||
|
||||
### param: Page.getByLabel.text = %%-locator-get-by-text-text-%%
|
||||
### option: Page.getByLabel.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Page.getByLabel.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Page.getByPlaceholder
|
||||
* since: v1.27
|
||||
|
|
@ -2210,8 +2244,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-placeholder-text-%%
|
||||
|
||||
### param: Page.getByPlaceholder.text = %%-locator-get-by-text-text-%%
|
||||
### option: Page.getByPlaceholder.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Page.getByPlaceholder.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Page.getByRole
|
||||
* since: v1.27
|
||||
|
|
@ -2220,10 +2254,11 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-role-%%
|
||||
|
||||
### param: Page.getByRole.role = %%-locator-get-by-role-role-%%
|
||||
|
||||
### option: Page.getByRole.-inline- = %%-locator-get-by-role-option-list-v1.27-%%
|
||||
* since: v1.27
|
||||
### option: Page.getByRole.exact = %%-locator-get-by-role-option-exact-%%
|
||||
|
||||
### option: Page.getByRole.exact = %%-locator-get-by-role-option-exact-%%
|
||||
|
||||
## method: Page.getByTestId
|
||||
* since: v1.27
|
||||
|
|
@ -2234,7 +2269,6 @@ Attribute name to get the value for.
|
|||
### param: Page.getByTestId.testId = %%-locator-get-by-test-id-test-id-%%
|
||||
* since: v1.27
|
||||
|
||||
|
||||
## method: Page.getByText
|
||||
* since: v1.27
|
||||
- returns: <[Locator]>
|
||||
|
|
@ -2242,8 +2276,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-text-%%
|
||||
|
||||
### param: Page.getByText.text = %%-locator-get-by-text-text-%%
|
||||
### option: Page.getByText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Page.getByText.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## method: Page.getByTitle
|
||||
* since: v1.27
|
||||
|
|
@ -2252,8 +2286,8 @@ Attribute name to get the value for.
|
|||
%%-template-locator-get-by-title-%%
|
||||
|
||||
### param: Page.getByTitle.text = %%-locator-get-by-text-text-%%
|
||||
### option: Page.getByTitle.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
### option: Page.getByTitle.exact = %%-locator-get-by-text-exact-%%
|
||||
|
||||
## async method: Page.goBack
|
||||
* since: v1.8
|
||||
|
|
@ -2360,16 +2394,22 @@ Shortcut for main frame's [`method: Frame.hover`].
|
|||
|
||||
### option: Page.hover.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.hover.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.hover.position = %%-input-position-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.hover.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.hover.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.hover.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
### option: Page.hover.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.28
|
||||
|
||||
|
|
@ -2384,6 +2424,7 @@ Returns `element.innerHTML`.
|
|||
|
||||
### option: Page.innerHTML.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.innerHTML.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -2398,6 +2439,7 @@ Returns `element.innerText`.
|
|||
|
||||
### option: Page.innerText.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.innerText.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -2414,6 +2456,7 @@ Throws for non-input elements. However, if the element is inside the `<label>` e
|
|||
|
||||
### option: Page.inputValue.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.inputValue.timeout = %%-input-timeout-%%
|
||||
* since: v1.13
|
||||
|
||||
|
|
@ -2426,9 +2469,9 @@ Returns whether the element is checked. Throws if the element is not a checkbox
|
|||
### param: Page.isChecked.selector = %%-input-selector-%%
|
||||
* since: v1.8
|
||||
|
||||
|
||||
### option: Page.isChecked.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.isChecked.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -2449,6 +2492,7 @@ Returns whether the element is disabled, the opposite of [enabled](../actionabil
|
|||
|
||||
### option: Page.isDisabled.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.isDisabled.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -2463,6 +2507,7 @@ Returns whether the element is [editable](../actionability.md#editable).
|
|||
|
||||
### option: Page.isEditable.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.isEditable.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -2477,6 +2522,7 @@ Returns whether the element is [enabled](../actionability.md#enabled).
|
|||
|
||||
### option: Page.isEnabled.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.isEnabled.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -2491,6 +2537,7 @@ Returns whether the element is hidden, the opposite of [visible](../actionabilit
|
|||
|
||||
### option: Page.isHidden.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.isHidden.timeout
|
||||
* since: v1.8
|
||||
- `timeout` <[float]>
|
||||
|
|
@ -2508,6 +2555,7 @@ Returns whether the element is [visible](../actionability.md#visible). [`option:
|
|||
|
||||
### option: Page.isVisible.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.isVisible.timeout
|
||||
* since: v1.8
|
||||
- `timeout` <[float]>
|
||||
|
|
@ -2526,6 +2574,7 @@ Returns whether the element is [visible](../actionability.md#visible). [`option:
|
|||
|
||||
### param: Page.locator.selector = %%-find-selector-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.locator.-inline- = %%-locator-options-list-v1.14-%%
|
||||
* since: v1.14
|
||||
|
||||
|
|
@ -2857,8 +2906,10 @@ Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
|
|||
|
||||
### option: Page.press.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.press.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.press.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -3077,6 +3128,7 @@ Enabling routing disables http cache.
|
|||
A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
|
||||
When a [`option: baseURL`] via the context options was provided and the passed URL is a path,
|
||||
it gets merged via the [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
|
||||
|
||||
### param: Page.route.handler
|
||||
* since: v1.8
|
||||
* langs: js, python
|
||||
|
|
@ -3113,7 +3165,6 @@ Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerec
|
|||
### option: Page.routeFromHAR.notFound
|
||||
* since: v1.23
|
||||
- `notFound` ?<[HarNotFound]<"abort"|"fallback">>
|
||||
|
||||
* If set to 'abort' any request not found in the HAR file will be aborted.
|
||||
* If set to 'fallback' missing requests will be sent to the network.
|
||||
|
||||
|
|
@ -3210,14 +3261,19 @@ Shortcut for main frame's [`method: Frame.selectOption`].
|
|||
|
||||
### param: Page.selectOption.selector = %%-input-selector-%%
|
||||
* since: v1.8
|
||||
|
||||
### param: Page.selectOption.values = %%-select-options-values-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.selectOption.force = %%-input-force-%%
|
||||
* since: v1.13
|
||||
|
||||
### option: Page.selectOption.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.selectOption.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.selectOption.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -3243,18 +3299,25 @@ Shortcut for main frame's [`method: Frame.setChecked`].
|
|||
|
||||
### param: Page.setChecked.selector = %%-input-selector-%%
|
||||
* since: v1.15
|
||||
|
||||
### param: Page.setChecked.checked = %%-input-checked-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Page.setChecked.force = %%-input-force-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Page.setChecked.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Page.setChecked.position = %%-input-position-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Page.setChecked.strict = %%-input-strict-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Page.setChecked.timeout = %%-input-timeout-%%
|
||||
* since: v1.15
|
||||
|
||||
### option: Page.setChecked.trial = %%-input-trial-%%
|
||||
* since: v1.15
|
||||
|
||||
|
|
@ -3343,8 +3406,10 @@ This method expects [`param: selector`] to point to an
|
|||
|
||||
### option: Page.setInputFiles.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.setInputFiles.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.setInputFiles.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -3433,16 +3498,22 @@ Shortcut for main frame's [`method: Frame.tap`].
|
|||
|
||||
### option: Page.tap.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.tap.modifiers = %%-input-modifiers-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.tap.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.tap.position = %%-input-position-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.tap.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.tap.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.tap.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -3457,6 +3528,7 @@ Returns `element.textContent`.
|
|||
|
||||
### option: Page.textContent.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.textContent.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -3524,8 +3596,10 @@ Time to wait between key presses in milliseconds. Defaults to 0.
|
|||
|
||||
### option: Page.type.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.type.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.type.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -3554,14 +3628,19 @@ Shortcut for main frame's [`method: Frame.uncheck`].
|
|||
|
||||
### option: Page.uncheck.force = %%-input-force-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.uncheck.noWaitAfter = %%-input-no-wait-after-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.uncheck.position = %%-input-position-%%
|
||||
* since: v1.11
|
||||
|
||||
### option: Page.uncheck.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.uncheck.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.uncheck.trial = %%-input-trial-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -4140,7 +4219,6 @@ Request URL string, regex or predicate receiving [Request] object.
|
|||
Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to disable the timeout. The default value can be
|
||||
changed by using the [`method: Page.setDefaultTimeout`] method.
|
||||
|
||||
|
||||
## async method: Page.waitForRequestFinished
|
||||
* since: v1.12
|
||||
* langs: java, python, csharp
|
||||
|
|
@ -4161,7 +4239,6 @@ Receives the [Request] object and resolves to truthy value when the waiting shou
|
|||
### option: Page.waitForRequestFinished.timeout = %%-wait-for-event-timeout-%%
|
||||
* since: v1.12
|
||||
|
||||
|
||||
## async method: Page.waitForResponse
|
||||
* since: v1.8
|
||||
* langs:
|
||||
|
|
@ -4392,8 +4469,10 @@ class FrameExamples
|
|||
|
||||
### option: Page.waitForSelector.state = %%-wait-for-selector-state-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.waitForSelector.strict = %%-input-strict-%%
|
||||
* since: v1.14
|
||||
|
||||
### option: Page.waitForSelector.timeout = %%-input-timeout-%%
|
||||
* since: v1.8
|
||||
|
||||
|
|
@ -4472,8 +4551,10 @@ Shortcut for main frame's [`method: Frame.waitForURL`].
|
|||
|
||||
### param: Page.waitForURL.url = %%-wait-for-navigation-url-%%
|
||||
* since: v1.11
|
||||
|
||||
### option: Page.waitForURL.timeout = %%-navigation-timeout-%%
|
||||
* since: v1.11
|
||||
|
||||
### option: Page.waitForURL.waitUntil = %%-navigation-wait-until-%%
|
||||
* since: v1.11
|
||||
|
||||
|
|
@ -4544,7 +4625,9 @@ Will throw an error if the page is closed before the `event` is fired.
|
|||
|
||||
### param: Page.waitForEvent2.event = %%-wait-for-event-event-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.waitForEvent2.predicate = %%-wait-for-event-predicate-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: Page.waitForEvent2.timeout = %%-wait-for-event-timeout-%%
|
||||
* since: v1.8
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ await Expect(page).Not.ToHaveURL("error");
|
|||
|
||||
The opposite of [`method: PageAssertions.toHaveTitle`].
|
||||
|
||||
|
||||
### param: PageAssertions.NotToHaveTitle.titleOrRegExp
|
||||
* since: v1.18
|
||||
- `titleOrRegExp` <[string]|[RegExp]>
|
||||
|
|
@ -103,6 +102,7 @@ Expected title or RegExp.
|
|||
|
||||
### option: PageAssertions.NotToHaveTitle.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: PageAssertions.NotToHaveTitle.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -121,10 +121,10 @@ Expected URL string or RegExp.
|
|||
|
||||
### option: PageAssertions.NotToHaveURL.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: PageAssertions.NotToHaveURL.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
||||
## async method: PageAssertions.toHaveScreenshot#1
|
||||
* since: v1.23
|
||||
* langs: js
|
||||
|
|
@ -144,28 +144,37 @@ Snapshot name.
|
|||
|
||||
### option: PageAssertions.toHaveScreenshot#1.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#1.animations = %%-screenshot-option-animations-default-disabled-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#1.caret = %%-screenshot-option-caret-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#1.clip = %%-screenshot-option-clip-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#1.fullPage = %%-screenshot-option-full-page-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#1.mask = %%-screenshot-option-mask-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#1.omitBackground = %%-screenshot-option-omit-background-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#1.scale = %%-screenshot-option-scale-default-css-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#1.maxDiffPixels = %%-assertions-max-diff-pixels-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#1.maxDiffPixelRatio = %%-assertions-max-diff-pixel-ratio-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#1.threshold = %%-assertions-threshold-%%
|
||||
* since: v1.23
|
||||
|
||||
|
||||
## async method: PageAssertions.toHaveScreenshot#2
|
||||
* since: v1.23
|
||||
* langs: js
|
||||
|
|
@ -179,28 +188,37 @@ await expect(page).toHaveScreenshot();
|
|||
|
||||
### option: PageAssertions.toHaveScreenshot#2.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#2.animations = %%-screenshot-option-animations-default-disabled-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#2.caret = %%-screenshot-option-caret-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#2.clip = %%-screenshot-option-clip-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#2.fullPage = %%-screenshot-option-full-page-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#2.mask = %%-screenshot-option-mask-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#2.omitBackground = %%-screenshot-option-omit-background-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#2.scale = %%-screenshot-option-scale-default-css-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#2.maxDiffPixels = %%-assertions-max-diff-pixels-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#2.maxDiffPixelRatio = %%-assertions-max-diff-pixel-ratio-%%
|
||||
* since: v1.23
|
||||
|
||||
### option: PageAssertions.toHaveScreenshot#2.threshold = %%-assertions-threshold-%%
|
||||
* since: v1.23
|
||||
|
||||
|
||||
## async method: PageAssertions.toHaveTitle
|
||||
* since: v1.20
|
||||
* langs:
|
||||
|
|
@ -244,6 +262,7 @@ Expected title or RegExp.
|
|||
|
||||
### option: PageAssertions.toHaveTitle.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: PageAssertions.toHaveTitle.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
|
|
@ -290,5 +309,6 @@ Expected URL string or RegExp.
|
|||
|
||||
### option: PageAssertions.toHaveURL.timeout = %%-js-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
||||
### option: PageAssertions.toHaveURL.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||
* since: v1.18
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@ Returns the value of the header matching the name. The name is case insensitive.
|
|||
|
||||
Name of the header.
|
||||
|
||||
|
||||
## method: Request.isNavigationRequest
|
||||
* since: v1.8
|
||||
- returns: <[boolean]>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ APIResponse response = context.request().post("https://example.com/upload_member
|
|||
```
|
||||
|
||||
Alternatively, you can build the file payload manually:
|
||||
|
||||
```java
|
||||
FilePayload filePayload = new FilePayload("members.csv", "text/csv",
|
||||
"Alice, 33\nJohn, 35\n".getBytes(StandardCharsets.UTF_8));
|
||||
|
|
|
|||
|
|
@ -48,8 +48,6 @@ Snapshot name.
|
|||
### option: ScreenshotAssertions.toMatchSnapshot#1.threshold = %%-assertions-threshold-%%
|
||||
* since: v1.22
|
||||
|
||||
|
||||
|
||||
## method: ScreenshotAssertions.toMatchSnapshot#2
|
||||
* since: v1.22
|
||||
|
||||
|
|
@ -87,4 +85,3 @@ Snapshot name. If not passed, the test name and ordinals are used when called mu
|
|||
|
||||
### option: ScreenshotAssertions.toMatchSnapshot#2.threshold = %%-assertions-threshold-%%
|
||||
* since: v1.22
|
||||
|
||||
|
|
|
|||
|
|
@ -263,7 +263,6 @@ await context.Tracing.StopChunkAsync(new()
|
|||
|
||||
Trace name to be shown in the Trace Viewer.
|
||||
|
||||
|
||||
## async method: Tracing.stop
|
||||
* since: v1.12
|
||||
|
||||
|
|
@ -275,8 +274,6 @@ Stop tracing.
|
|||
|
||||
Export trace into the file with the given path.
|
||||
|
||||
|
||||
|
||||
## async method: Tracing.stopChunk
|
||||
* since: v1.15
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,9 @@ Will throw an error if the socket is closed before the `event` is fired.
|
|||
|
||||
### param: WebSocket.waitForEvent2.event = %%-wait-for-event-event-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: WebSocket.waitForEvent2.predicate = %%-wait-for-event-predicate-%%
|
||||
* since: v1.8
|
||||
|
||||
### option: WebSocket.waitForEvent2.timeout = %%-wait-for-event-timeout-%%
|
||||
* since: v1.8
|
||||
|
|
|
|||
4683
packages/playwright-core/types/types.d.ts
vendored
4683
packages/playwright-core/types/types.d.ts
vendored
File diff suppressed because it is too large
Load diff
1016
packages/playwright-test/types/test.d.ts
vendored
1016
packages/playwright-test/types/test.d.ts
vendored
File diff suppressed because it is too large
Load diff
95
packages/playwright-test/types/testReporter.d.ts
vendored
95
packages/playwright-test/types/testReporter.d.ts
vendored
|
|
@ -66,8 +66,8 @@ export interface Suite {
|
|||
|
||||
/**
|
||||
* Test cases in the suite. Note that only test cases defined directly in this suite are in the list. Any test cases
|
||||
* defined in nested [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1) groups
|
||||
* are listed in the child [suite.suites](https://playwright.dev/docs/api/class-suite#suite-suites).
|
||||
* defined in nested [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1)
|
||||
* groups are listed in the child [suite.suites](https://playwright.dev/docs/api/class-suite#suite-suites).
|
||||
*/
|
||||
tests: Array<TestCase>;
|
||||
|
||||
|
|
@ -76,8 +76,8 @@ export interface Suite {
|
|||
* - Empty for root suite.
|
||||
* - Project name for project suite.
|
||||
* - File path for file suite.
|
||||
* - Title passed to [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1) for a
|
||||
* group suite.
|
||||
* - Title passed to [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1)
|
||||
* for a group suite.
|
||||
*/
|
||||
title: string;
|
||||
|
||||
|
|
@ -87,10 +87,11 @@ export interface Suite {
|
|||
titlePath(): Array<string>;}
|
||||
|
||||
/**
|
||||
* `TestCase` corresponds to every [test.(call)(title, testFunction)](https://playwright.dev/docs/api/class-test#test-call)
|
||||
* call in a test file. When a single
|
||||
* [test.(call)(title, testFunction)](https://playwright.dev/docs/api/class-test#test-call) is running in multiple projects
|
||||
* or repeated multiple times, it will have multiple `TestCase` objects in corresponding projects' suites.
|
||||
* `TestCase` corresponds to every
|
||||
* [test.(call)(title, testFunction)](https://playwright.dev/docs/api/class-test#test-call) call in a test file. When
|
||||
* a single [test.(call)(title, testFunction)](https://playwright.dev/docs/api/class-test#test-call) is running in
|
||||
* multiple projects or repeated multiple times, it will have multiple `TestCase` objects in corresponding projects'
|
||||
* suites.
|
||||
*/
|
||||
export interface TestCase {
|
||||
/**
|
||||
|
|
@ -98,16 +99,18 @@ export interface TestCase {
|
|||
* - Tests marked as [test.skip(title, testFunction)](https://playwright.dev/docs/api/class-test#test-skip-1) or
|
||||
* [test.fixme(title, testFunction)](https://playwright.dev/docs/api/class-test#test-fixme-1) are expected to be
|
||||
* `'skipped'`.
|
||||
* - Tests marked as [test.fail()](https://playwright.dev/docs/api/class-test#test-fail-1) are expected to be `'failed'`.
|
||||
* - Tests marked as [test.fail()](https://playwright.dev/docs/api/class-test#test-fail-1) are expected to be
|
||||
* `'failed'`.
|
||||
* - Other tests are expected to be `'passed'`.
|
||||
*
|
||||
* See also [testResult.status](https://playwright.dev/docs/api/class-testresult#test-result-status) for the actual status.
|
||||
* See also [testResult.status](https://playwright.dev/docs/api/class-testresult#test-result-status) for the actual
|
||||
* status.
|
||||
*/
|
||||
expectedStatus: TestStatus;
|
||||
/**
|
||||
* The list of annotations applicable to the current test. Includes annotations from the test, annotations from all
|
||||
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1) groups the test belongs to
|
||||
* and file-level annotations for the test file.
|
||||
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1) groups the test
|
||||
* belongs to and file-level annotations for the test file.
|
||||
*
|
||||
* Annotations are available during test execution through
|
||||
* [testInfo.annotations](https://playwright.dev/docs/api/class-testinfo#test-info-annotations).
|
||||
|
|
@ -156,8 +159,8 @@ export interface TestCase {
|
|||
parent: Suite;
|
||||
|
||||
/**
|
||||
* Contains the repeat index when running in "repeat each" mode. This mode is enabled by passing `--repeat-each` to the
|
||||
* [command line](https://playwright.dev/docs/test-cli).
|
||||
* Contains the repeat index when running in "repeat each" mode. This mode is enabled by passing `--repeat-each` to
|
||||
* the [command line](https://playwright.dev/docs/test-cli).
|
||||
*/
|
||||
repeatEachIndex: number;
|
||||
|
||||
|
|
@ -184,8 +187,8 @@ export interface TestCase {
|
|||
timeout: number;
|
||||
|
||||
/**
|
||||
* Test title as passed to the [test.(call)(title, testFunction)](https://playwright.dev/docs/api/class-test#test-call)
|
||||
* call.
|
||||
* Test title as passed to the
|
||||
* [test.(call)(title, testFunction)](https://playwright.dev/docs/api/class-test#test-call) call.
|
||||
*/
|
||||
title: string;
|
||||
|
||||
|
|
@ -214,7 +217,8 @@ export interface TestResult {
|
|||
name: string;
|
||||
|
||||
/**
|
||||
* Content type of this attachment to properly present in the report, for example `'application/json'` or `'image/png'`.
|
||||
* Content type of this attachment to properly present in the report, for example `'application/json'` or
|
||||
* `'image/png'`.
|
||||
*/
|
||||
contentType: string;
|
||||
|
||||
|
|
@ -273,8 +277,8 @@ export interface TestResult {
|
|||
steps: Array<TestStep>;
|
||||
|
||||
/**
|
||||
* Index of the worker where the test was run. If the test was not run a single time, for example when the user interrupted
|
||||
* testing, the only result will have a `workerIndex` equal to `-1`.
|
||||
* Index of the worker where the test was run. If the test was not run a single time, for example when the user
|
||||
* interrupted testing, the only result will have a `workerIndex` equal to `-1`.
|
||||
*
|
||||
* Learn more about [parallelism and sharding](https://playwright.dev/docs/test-parallel) with Playwright Test.
|
||||
*/
|
||||
|
|
@ -295,10 +299,11 @@ export interface FullResult {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test runner notifies the reporter about various events during test execution. All methods of the reporter are optional.
|
||||
* Test runner notifies the reporter about various events during test execution. All methods of the reporter are
|
||||
* optional.
|
||||
*
|
||||
* You can create a custom reporter by implementing a class with some of the reporter methods. Make sure to export this
|
||||
* class as default.
|
||||
* You can create a custom reporter by implementing a class with some of the reporter methods. Make sure to export
|
||||
* this class as default.
|
||||
*
|
||||
* ```js
|
||||
* // my-awesome-reporter.ts
|
||||
|
|
@ -324,8 +329,9 @@ export interface FullResult {
|
|||
* export default MyReporter;
|
||||
* ```
|
||||
*
|
||||
* Now use this reporter with [testConfig.reporter](https://playwright.dev/docs/api/class-testconfig#test-config-reporter).
|
||||
* Learn more about [using reporters](https://playwright.dev/docs/test-reporters).
|
||||
* Now use this reporter with
|
||||
* [testConfig.reporter](https://playwright.dev/docs/api/class-testconfig#test-config-reporter). Learn more about
|
||||
* [using reporters](https://playwright.dev/docs/test-reporters).
|
||||
*
|
||||
* ```js
|
||||
* // playwright.config.ts
|
||||
|
|
@ -338,28 +344,29 @@ export interface FullResult {
|
|||
* ```
|
||||
*
|
||||
* Here is a typical order of reporter calls:
|
||||
* - [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin) is called once
|
||||
* with a root suite that contains all other suites and tests. Learn more about [suites hierarchy][Suite].
|
||||
* - [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin) is called
|
||||
* once with a root suite that contains all other suites and tests. Learn more about [suites hierarchy][Suite].
|
||||
* - [reporter.onTestBegin(test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-test-begin) is
|
||||
* called for each test run. It is given a [TestCase] that is executed, and a [TestResult] that is almost empty. Test
|
||||
* result will be populated while the test runs (for example, with steps and stdio) and will get final `status` once
|
||||
* the test finishes.
|
||||
* called for each test run. It is given a [TestCase] that is executed, and a [TestResult] that is almost empty.
|
||||
* Test result will be populated while the test runs (for example, with steps and stdio) and will get final
|
||||
* `status` once the test finishes.
|
||||
* - [reporter.onStepBegin(test, result, step)](https://playwright.dev/docs/api/class-reporter#reporter-on-step-begin)
|
||||
* and [reporter.onStepEnd(test, result, step)](https://playwright.dev/docs/api/class-reporter#reporter-on-step-end)
|
||||
* and
|
||||
* [reporter.onStepEnd(test, result, step)](https://playwright.dev/docs/api/class-reporter#reporter-on-step-end)
|
||||
* are called for each executed step inside the test. When steps are executed, test run has not finished yet.
|
||||
* - [reporter.onTestEnd(test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-test-end) is called
|
||||
* when test run has finished. By this time, [TestResult] is complete and you can use
|
||||
* - [reporter.onTestEnd(test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-test-end) is
|
||||
* called when test run has finished. By this time, [TestResult] is complete and you can use
|
||||
* [testResult.status](https://playwright.dev/docs/api/class-testresult#test-result-status),
|
||||
* [testResult.error](https://playwright.dev/docs/api/class-testresult#test-result-error) and more.
|
||||
* - [reporter.onEnd(result)](https://playwright.dev/docs/api/class-reporter#reporter-on-end) is called once after all
|
||||
* tests that should run had finished.
|
||||
* - [reporter.onEnd(result)](https://playwright.dev/docs/api/class-reporter#reporter-on-end) is called once after
|
||||
* all tests that should run had finished.
|
||||
*
|
||||
* Additionally,
|
||||
* [reporter.onStdOut(chunk, test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-std-out) and
|
||||
* [reporter.onStdErr(chunk, test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-std-err) are called
|
||||
* when standard output is produced in the worker process, possibly during a test execution, and
|
||||
* [reporter.onError(error)](https://playwright.dev/docs/api/class-reporter#reporter-on-error) is called when something
|
||||
* went wrong outside of the test execution.
|
||||
* [reporter.onStdErr(chunk, test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-std-err) are
|
||||
* called when standard output is produced in the worker process, possibly during a test execution, and
|
||||
* [reporter.onError(error)](https://playwright.dev/docs/api/class-reporter#reporter-on-error) is called when
|
||||
* something went wrong outside of the test execution.
|
||||
*/
|
||||
export interface Reporter {
|
||||
/**
|
||||
|
|
@ -369,13 +376,13 @@ export interface Reporter {
|
|||
*/
|
||||
onBegin?(config: FullConfig, suite: Suite): void;
|
||||
/**
|
||||
* Called after all tests has been run, or testing has been interrupted. Note that this method may return a [Promise] and
|
||||
* Playwright Test will await it.
|
||||
* Called after all tests has been run, or testing has been interrupted. Note that this method may return a [Promise]
|
||||
* and Playwright Test will await it.
|
||||
* @param result Result of the full test run. - `'passed'` - Everything went as expected.
|
||||
* - `'failed'` - Any test has failed.
|
||||
* - `'timedout'` - The
|
||||
* [testConfig.globalTimeout](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout) has been
|
||||
* reached.
|
||||
* [testConfig.globalTimeout](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout) has
|
||||
* been reached.
|
||||
* - `'interrupted'` - Interrupted by the user.
|
||||
*/
|
||||
onEnd?(result: FullResult): void | Promise<void>;
|
||||
|
|
@ -432,8 +439,8 @@ export interface Reporter {
|
|||
onTestEnd?(test: TestCase, result: TestResult): void;
|
||||
|
||||
/**
|
||||
* Whether this reporter uses stdio for reporting. When it does not, Playwright Test could add some output to enhance user
|
||||
* experience.
|
||||
* Whether this reporter uses stdio for reporting. When it does not, Playwright Test could add some output to enhance
|
||||
* user experience.
|
||||
*/
|
||||
printsToStdio?(): boolean;}
|
||||
|
||||
|
|
|
|||
|
|
@ -863,7 +863,8 @@ function generateSourceCodeComment(spec) {
|
|||
node.text = '> NOTE: ' + node.text;
|
||||
}
|
||||
});
|
||||
return md.render(comments, 120);
|
||||
// 5 is a typical member doc offset.
|
||||
return md.render(comments, { maxColumns: 120 - 5, omitLastCR: true, flattenText: true });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -62,6 +62,13 @@
|
|||
* lines: string[],
|
||||
* }} MarkdownPropsNode */
|
||||
|
||||
/** @typedef {{
|
||||
* maxColumns?: number,
|
||||
* omitLastCR?: boolean,
|
||||
* flattenText?: boolean
|
||||
* }} RenderOptions
|
||||
*/
|
||||
|
||||
/** @typedef {MarkdownTextNode | MarkdownLiNode | MarkdownCodeNode | MarkdownNoteNode | MarkdownHeaderNode | MarkdownNullNode | MarkdownPropsNode } MarkdownNode */
|
||||
|
||||
function flattenWrappedLines(content) {
|
||||
|
|
@ -87,7 +94,7 @@ function flattenWrappedLines(content) {
|
|||
flushLastParagraph = true;
|
||||
}
|
||||
if (flushLastParagraph && outLineTokens.length) {
|
||||
outLines.push(outLineTokens.join(' '));
|
||||
outLines.push(outLineTokens.join('↵'));
|
||||
outLineTokens = [];
|
||||
}
|
||||
if (inCodeBlock || singleLineExpression || codeBlockBoundary)
|
||||
|
|
@ -96,7 +103,7 @@ function flattenWrappedLines(content) {
|
|||
outLineTokens.push(outLineTokens.length ? line.trim() : line);
|
||||
}
|
||||
if (outLineTokens.length)
|
||||
outLines.push(outLineTokens.join(' '));
|
||||
outLines.push(outLineTokens.join('↵'));
|
||||
return outLines;
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +204,7 @@ function buildTree(lines) {
|
|||
tokens.push(line.substring(indent.length));
|
||||
line = lines[++i];
|
||||
}
|
||||
node.text = tokens.join(' ');
|
||||
node.text = tokens.join('↵');
|
||||
appendNode(indent, node);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -251,17 +258,19 @@ function parse(content) {
|
|||
|
||||
/**
|
||||
* @param {MarkdownNode[]} nodes
|
||||
* @param {number=} maxColumns
|
||||
* @param {RenderOptions=} options
|
||||
*/
|
||||
function render(nodes, maxColumns) {
|
||||
function render(nodes, options) {
|
||||
const result = [];
|
||||
let lastNode;
|
||||
for (let node of nodes) {
|
||||
if (node.type === 'null')
|
||||
continue;
|
||||
innerRenderMdNode('', node, /** @type {MarkdownNode} */ (lastNode), result, maxColumns);
|
||||
innerRenderMdNode('', node, /** @type {MarkdownNode} */ (lastNode), result, options);
|
||||
lastNode = node;
|
||||
}
|
||||
if (!options?.omitLastCR && result[result.length - 1] !== '')
|
||||
result.push('');
|
||||
return result.join('\n');
|
||||
}
|
||||
|
||||
|
|
@ -269,12 +278,12 @@ function render(nodes, maxColumns) {
|
|||
* @param {string} indent
|
||||
* @param {MarkdownNode} node
|
||||
* @param {MarkdownNode} lastNode
|
||||
* @param {number=} maxColumns
|
||||
* @param {RenderOptions=} options
|
||||
* @param {string[]} result
|
||||
*/
|
||||
function innerRenderMdNode(indent, node, lastNode, result, maxColumns) {
|
||||
function innerRenderMdNode(indent, node, lastNode, result, options) {
|
||||
const newLine = () => {
|
||||
if (result[result.length - 1] !== '')
|
||||
if (result.length && result[result.length - 1] !== '')
|
||||
result.push('');
|
||||
};
|
||||
|
||||
|
|
@ -285,7 +294,7 @@ function innerRenderMdNode(indent, node, lastNode, result, maxColumns) {
|
|||
result.push(`${'#'.repeat(depth)} ${headerNode.text}`);
|
||||
let lastNode = node;
|
||||
for (const child of node.children || []) {
|
||||
innerRenderMdNode('', child, lastNode, result, maxColumns);
|
||||
innerRenderMdNode('', child, lastNode, result, options);
|
||||
lastNode = child;
|
||||
}
|
||||
}
|
||||
|
|
@ -297,8 +306,7 @@ function innerRenderMdNode(indent, node, lastNode, result, maxColumns) {
|
|||
const bothLinks = node.text.match(/\[[^\]]+\]:/) && lastNode && lastNode.type === 'text' && lastNode.text.match(/\[[^\]]+\]:/);
|
||||
if (!bothTables && !bothGen && !bothComments && !bothLinks && lastNode && lastNode.text)
|
||||
newLine();
|
||||
for (const line of node.text.split('\n'))
|
||||
result.push(wrapText(line, maxColumns, indent));
|
||||
result.push(wrapText(node.text, options, indent));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -315,7 +323,7 @@ function innerRenderMdNode(indent, node, lastNode, result, maxColumns) {
|
|||
if (node.type === 'note') {
|
||||
newLine();
|
||||
result.push(`${indent}:::${node.noteType}`);
|
||||
result.push(`${wrapText(node.text, maxColumns, indent)}`);
|
||||
result.push(wrapText(node.text, options, indent));
|
||||
result.push(`${indent}:::`);
|
||||
newLine();
|
||||
return;
|
||||
|
|
@ -337,10 +345,10 @@ function innerRenderMdNode(indent, node, lastNode, result, maxColumns) {
|
|||
case 'default': char = '-'; break;
|
||||
case 'ordinal': char = '1.'; break;
|
||||
}
|
||||
result.push(`${wrapText(node.text, maxColumns, `${indent}${char} `)}`);
|
||||
result.push(wrapText(node.text, options, `${indent}${char} `));
|
||||
const newIndent = indent + ' '.repeat(char.length + 1);
|
||||
for (const child of node.children || []) {
|
||||
innerRenderMdNode(newIndent, child, lastNode, result, maxColumns);
|
||||
innerRenderMdNode(newIndent, child, lastNode, result, options);
|
||||
lastNode = child;
|
||||
}
|
||||
}
|
||||
|
|
@ -361,18 +369,37 @@ function tokenizeNoBreakLinks(text) {
|
|||
|
||||
/**
|
||||
* @param {string} text
|
||||
* @param {number=} maxColumns
|
||||
* @param {string=} prefix
|
||||
* @param {RenderOptions|undefined} options
|
||||
* @param {string} prefix
|
||||
* @returns {string}
|
||||
*/
|
||||
function wrapText(text, maxColumns = 0, prefix = '') {
|
||||
function wrapText(text, options, prefix) {
|
||||
if (options?.flattenText)
|
||||
text = text.replace(/↵/g, ' ');
|
||||
const lines = text.split(/[\n↵]/);
|
||||
const result = /** @type {string[]} */([]);
|
||||
const indent = ' '.repeat(prefix.length);
|
||||
for (const line of lines) {
|
||||
result.push(wrapLine(line, options?.maxColumns, result.length ? indent : prefix));
|
||||
}
|
||||
return result.join('\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} textLine
|
||||
* @param {number|undefined} maxColumns
|
||||
* @param {string} prefix
|
||||
* @returns {string}
|
||||
*/
|
||||
function wrapLine(textLine, maxColumns, prefix) {
|
||||
if (!maxColumns)
|
||||
return prefix + text;
|
||||
if (text.trim().startsWith('|'))
|
||||
return prefix + text;
|
||||
return prefix + textLine;
|
||||
if (textLine.trim().startsWith('|'))
|
||||
return prefix + textLine;
|
||||
const indent = ' '.repeat(prefix.length);
|
||||
const lines = [];
|
||||
maxColumns -= indent.length;
|
||||
const words = tokenizeNoBreakLinks(text);
|
||||
const words = tokenizeNoBreakLinks(textLine);
|
||||
let line = '';
|
||||
for (const word of words) {
|
||||
if (line.length && line.length + word.length < maxColumns) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue