Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs(android): android doc nits (#5924)

Pavel Feldmanf70eaf4ff3f2
diff --git a/docs/src/api/class-android.md b/docs/src/api/class-android.md
index eafb50258f..9c42a750cf 100644
--- a/docs/src/api/class-android.md
+++ b/docs/src/api/class-android.md
@@ -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());
}
diff --git a/types/types.d.ts b/types/types.d.ts
index 267a0e3889..7db7ddc08b 100644
--- a/types/types.d.ts
+++ b/types/types.d.ts
@@ -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());
* }
*