mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs(android): android doc nits (#5924)
This commit is contained in:
parent
8f1d03f846
commit
f70eaf4ff3
@ -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.
|
||||
@ -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());
|
||||
}
|
||||
|
||||
|
8
types/types.d.ts
vendored
8
types/types.d.ts
vendored
@ -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.
|
||||
@ -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());
|
||||
* }
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user