mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: check that description has an empty line before it (#32830)
This commit is contained in:
parent
6465f0b1bd
commit
d07f6cfc5c
@ -177,7 +177,9 @@ Launches a process in the shell on the device and returns a socket to communicat
|
|||||||
|
|
||||||
### param: AndroidDevice.open.command
|
### param: AndroidDevice.open.command
|
||||||
* since: v1.9
|
* since: v1.9
|
||||||
- `command` <[string]> Shell command to execute.
|
- `command` <[string]>
|
||||||
|
|
||||||
|
Shell command to execute.
|
||||||
|
|
||||||
## async method: AndroidDevice.pinchClose
|
## async method: AndroidDevice.pinchClose
|
||||||
* since: v1.9
|
* since: v1.9
|
||||||
|
|||||||
@ -4093,12 +4093,16 @@ await page.GotoAsync("https://www.microsoft.com");
|
|||||||
### param: Page.setViewportSize.width
|
### param: Page.setViewportSize.width
|
||||||
* since: v1.10
|
* since: v1.10
|
||||||
* langs: csharp, java
|
* langs: csharp, java
|
||||||
- `width` <[int]> page width in pixels.
|
- `width` <[int]>
|
||||||
|
|
||||||
|
Page width in pixels.
|
||||||
|
|
||||||
### param: Page.setViewportSize.height
|
### param: Page.setViewportSize.height
|
||||||
* since: v1.10
|
* since: v1.10
|
||||||
* langs: csharp, java
|
* langs: csharp, java
|
||||||
- `height` <[int]> page height in pixels.
|
- `height` <[int]>
|
||||||
|
|
||||||
|
Page height in pixels.
|
||||||
|
|
||||||
## async method: Page.tap
|
## async method: Page.tap
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
|
|||||||
@ -765,8 +765,6 @@ not recorded. Make sure to call [`method: BrowserContext.close`] for videos to b
|
|||||||
* langs: csharp, java, python
|
* langs: csharp, java, python
|
||||||
- alias-python: record_video_size
|
- alias-python: record_video_size
|
||||||
- `recordVideoSize` <[Object]>
|
- `recordVideoSize` <[Object]>
|
||||||
If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be
|
|
||||||
scaled down if necessary to fit the specified size.
|
|
||||||
- `width` <[int]> Video frame width.
|
- `width` <[int]> Video frame width.
|
||||||
- `height` <[int]> Video frame height.
|
- `height` <[int]> Video frame height.
|
||||||
|
|
||||||
|
|||||||
@ -1713,7 +1713,8 @@ Whether to box the step in the report. Defaults to `false`. When the step is box
|
|||||||
### option: Test.step.location
|
### option: Test.step.location
|
||||||
* since: v1.48
|
* since: v1.48
|
||||||
- `location` <[Location]>
|
- `location` <[Location]>
|
||||||
Specifies a custom location for the step to be shown in test reports. By default, location of the [`method: Test.step`] call is shown.
|
|
||||||
|
Specifies a custom location for the step to be shown in test reports and trace viewer. By default, location of the [`method: Test.step`] call is shown.
|
||||||
|
|
||||||
## method: Test.use
|
## method: Test.use
|
||||||
* since: v1.10
|
* since: v1.10
|
||||||
|
|||||||
2
packages/playwright-core/types/types.d.ts
vendored
2
packages/playwright-core/types/types.d.ts
vendored
@ -16825,7 +16825,7 @@ export interface AndroidDevice {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Launches a process in the shell on the device and returns a socket to communicate with the launched process.
|
* Launches a process in the shell on the device and returns a socket to communicate with the launched process.
|
||||||
* @param command
|
* @param command Shell command to execute.
|
||||||
*/
|
*/
|
||||||
open(command: string): Promise<AndroidSocket>;
|
open(command: string): Promise<AndroidSocket>;
|
||||||
|
|
||||||
|
|||||||
@ -165,7 +165,7 @@ class ApiParser {
|
|||||||
if (!name)
|
if (!name)
|
||||||
throw new Error('Invalid member name ' + spec.text);
|
throw new Error('Invalid member name ' + spec.text);
|
||||||
if (match[1] === 'param') {
|
if (match[1] === 'param') {
|
||||||
const arg = this.parseProperty(spec);
|
const arg = this.parseProperty(spec, match[2]);
|
||||||
if (!arg)
|
if (!arg)
|
||||||
return;
|
return;
|
||||||
arg.name = name;
|
arg.name = name;
|
||||||
@ -182,7 +182,7 @@ class ApiParser {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// match[1] === 'option'
|
// match[1] === 'option'
|
||||||
const p = this.parseProperty(spec);
|
const p = this.parseProperty(spec, match[2]);
|
||||||
if (!p)
|
if (!p)
|
||||||
return;
|
return;
|
||||||
let options = method.argsArray.find(o => o.name === 'options');
|
let options = method.argsArray.find(o => o.name === 'options');
|
||||||
@ -198,11 +198,14 @@ class ApiParser {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {MarkdownHeaderNode} spec
|
* @param {MarkdownHeaderNode} spec
|
||||||
|
* @param {string} memberName
|
||||||
* @returns {docs.Member | null}
|
* @returns {docs.Member | null}
|
||||||
*/
|
*/
|
||||||
parseProperty(spec) {
|
parseProperty(spec, memberName) {
|
||||||
const param = childrenWithoutProperties(spec)[0];
|
const param = childrenWithoutProperties(spec)[0];
|
||||||
const text = /** @type {string}*/(param.text);
|
const text = /** @type {string}*/(param.text);
|
||||||
|
if (text.substring(text.lastIndexOf('>') + 1).trim())
|
||||||
|
throw new Error(`Extra information after type while processing "${memberName}".\nYou probably need an extra empty line before the description.\n================\n${text}`);
|
||||||
let typeStart = text.indexOf('<');
|
let typeStart = text.indexOf('<');
|
||||||
while ('?e'.includes(text[typeStart - 1]))
|
while ('?e'.includes(text[typeStart - 1]))
|
||||||
typeStart--;
|
typeStart--;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user