Skip to content

Commit

Permalink
docs(android): android doc nits (#5924)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman authored Mar 23, 2021
1 parent 8f1d03f commit f70eaf4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/src/api/class-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
Playwright has **experimental** support for Android automation. You can access android namespace via:

```js
const { _android } = require('playwright');
const { _android: android } = require('playwright');
```

An example of the Android automation script would be:

```js
const { _android } = require('playwright');
const { _android: android } = require('playwright');

(async () => {
// Connect to the device.
const [device] = await playwright._android.devices();
const [device] = await android.devices();
console.log(`Model: ${device.model()}`);
console.log(`Serial: ${device.serial()}`);
// Take screenshot of the whole device.
Expand All @@ -35,7 +35,7 @@ const { _android } = require('playwright');

// Work with WebView's page as usual.
const page = await webview.page();
await page.page.waitForNavigation({ url: /.*microsoft\/playwright.*/ });
await page.waitForNavigation({ url: /.*microsoft\/playwright.*/ });
console.log(await page.title());
}

Expand Down
8 changes: 4 additions & 4 deletions types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7329,17 +7329,17 @@ export {};
* Playwright has **experimental** support for Android automation. You can access android namespace via:
*
* ```js
* const { _android } = require('playwright');
* const { _android: android } = require('playwright');
* ```
*
* An example of the Android automation script would be:
*
* ```js
* const { _android } = require('playwright');
* const { _android: android } = require('playwright');
*
* (async () => {
* // Connect to the device.
* const [device] = await playwright._android.devices();
* const [device] = await android.devices();
* console.log(`Model: ${device.model()}`);
* console.log(`Serial: ${device.serial()}`);
* // Take screenshot of the whole device.
Expand All @@ -7360,7 +7360,7 @@ export {};
*
* // Work with WebView's page as usual.
* const page = await webview.page();
* await page.page.waitForNavigation({ url: /.*microsoft\/playwright.*\/ });
* await page.waitForNavigation({ url: /.*microsoft\/playwright.*\/ });
* console.log(await page.title());
* }
*
Expand Down

0 comments on commit f70eaf4

Please sign in to comment.