Skip to content

Commit

Permalink
docs: add java traits to some methods (#5222)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s committed Jan 30, 2021
1 parent a1d875e commit 9c46686
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/src/api/class-browsercontext.md
Expand Up @@ -736,7 +736,7 @@ A glob pattern, regex pattern or predicate receiving [URL] used to register a ro
Optional handler function used to register a routing with [`method: BrowserContext.route`].

## async method: BrowserContext.waitForEvent
* langs:
* langs: csharp, js, python
- alias-python: expect_event
- returns: <[any]>

Expand Down
4 changes: 2 additions & 2 deletions docs/src/api/class-browsertype.md
Expand Up @@ -182,13 +182,13 @@ Maximum time in milliseconds to wait for the browser instance to start. Defaults
disable timeout.

### option: BrowserType.launch.env
* langs: csharp,java
* langs: csharp, java
- `env` <[Object]<[string], [string]>>

Specify environment variables that will be visible to the browser. Defaults to `process.env`.

### option: BrowserType.launch.env
* langs: js,python
* langs: js, python
- `env` <[Object]<[string], [string]|[float]|[boolean]>>

Specify environment variables that will be visible to the browser. Defaults to `process.env`.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/class-cdpsession.md
@@ -1,5 +1,5 @@
# class: CDPSession
* langs: js,python
* langs: js, python
* extends: [EventEmitter]

The `CDPSession` instances are used to talk raw Chrome Devtools Protocol:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/class-download.md
Expand Up @@ -39,7 +39,7 @@ not performed and user has no access to the downloaded files.
:::

## async method: Download.createReadStream
* langs: js
* langs: java, js
- returns: <[null]|[Readable]>

Returns readable stream for current download or `null` if download failed.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/api/class-frame.md
Expand Up @@ -594,6 +594,8 @@ Attribute name to get the value for.
### option: Frame.getAttribute.timeout = %%-input-timeout-%%

## async method: Frame.goto
* langs:
- alias-java: navigate
- returns: <[null]|[Response]>

Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
Expand Down
6 changes: 4 additions & 2 deletions docs/src/api/class-page.md
Expand Up @@ -1261,7 +1261,7 @@ frame = page.frame(url=r".*domain.*")
```

### param: Page.frame.frameSelector
* langs: js
* langs: java, js
- `frameSelector` <[string]|[Object]>
- `name` <[string]> Frame name specified in the `iframe`'s `name` attribute. Optional.
- `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]> A glob pattern, regex pattern or predicate receiving
Expand Down Expand Up @@ -1313,6 +1313,8 @@ Navigate to the next page in history.
### option: Page.goForward.waitUntil = %%-navigation-wait-until-%%

## async method: Page.goto
* langs:
- alias-java: navigate
- returns: <[null]|[Response]>

Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
Expand Down Expand Up @@ -2157,7 +2159,7 @@ Video object associated with this page.
- `height` <[int]> page height in pixels.

## async method: Page.waitForEvent
* langs:
* langs: csharp, js, python
- alias-python: expect_event
- returns: <[any]>

Expand Down
1 change: 1 addition & 0 deletions docs/src/api/class-route.md
Expand Up @@ -30,6 +30,7 @@ Optional error code. Defaults to `failed`, could be one of the following:

## async method: Route.continue
* langs:
- alias-java: continue_
- alias-python: continue_

Continues route's request with optional overrides.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/class-selectors.md
Expand Up @@ -57,7 +57,7 @@ Name that is used in selectors as a prefix, e.g. `{name: 'foo'}` enables `foo=my
contain `[a-zA-Z0-9_]` characters.

### param: Selectors.register.script
* langs: js
* langs: java, js
- `script` <[function]|[string]|[Object]>
- `path` <[path]> Path to the JavaScript file. If `path` is a relative path, then it is resolved relative to the
current working directory. Optional.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/class-websocket.md
Expand Up @@ -35,7 +35,7 @@ Indicates that the web socket has been closed.
Contains the URL of the WebSocket.

## async method: WebSocket.waitForEvent
* langs:
* langs: csharp, js, python
- alias-python: expect_event
- returns: <[any]>

Expand Down
8 changes: 4 additions & 4 deletions docs/src/api/params.md
Expand Up @@ -147,7 +147,7 @@ Whether to ignore HTTPS errors during navigation. Defaults to `false`.
Toggles bypassing page's Content-Security-Policy.

## context-option-viewport
* langs: js
* langs: java, js
- `viewport` <[null]|[Object]>
- `width` <[int]> page width in pixels.
- `height` <[int]> page height in pixels.
Expand Down Expand Up @@ -292,7 +292,7 @@ Logger sink for Playwright logging.
**DEPRECATED** Use [`option: recordVideo`] instead.

## context-option-recordhar
* langs: js
* langs: java, js
- `recordHar` <[Object]>
- `omitContent` <[boolean]> Optional setting to control whether to omit request content from the HAR. Defaults to
`false`.
Expand All @@ -315,7 +315,7 @@ Optional setting to control whether to omit request content from the HAR. Defaul
Path on the filesystem to write the HAR file to.

## context-option-recordvideo
* langs: js
* langs: java, js
- `recordVideo` <[Object]>
- `dir` <[path]> Path to the directory to put videos into.
- `size` <[Object]> Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport`.
Expand Down Expand Up @@ -356,7 +356,7 @@ option to work. If all contexts override the proxy, global proxy will be never u
`launch({ proxy: { server: 'per-context' } })`.

## select-options-values
* langs: js
* langs: java, js
- `values` <[null]|[string]|[ElementHandle]|[Array]<[string]>|[Object]|[Array]<[ElementHandle]>|[Array]<[Object]>>
- `value` <[string]> Matches by `option.value`. Optional.
- `label` <[string]> Matches by `option.label`. Optional.
Expand Down
2 changes: 1 addition & 1 deletion utils/doclint/api_parser.js
Expand Up @@ -315,7 +315,7 @@ function extractLangs(spec) {
aliases[match[1].trim()] = match[2].trim();
}
return {
only: only ? only.split(',') : undefined,
only: only ? only.split(',').map(l => l.trim()) : undefined,
aliases,
types: {},
overrides: {}
Expand Down

0 comments on commit 9c46686

Please sign in to comment.