You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`accept-encoding`: array of allowed encodings (a single encoding can also be passed as a string) https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding
26
26
27
+
Experimental:
28
+
29
+
-`customUserInteraction`: absolute path to a Javascript Common JS module, that exports a function with the signature `userInteraction: (page: Page) => Promise<void>`. For an example see below. Setting `customUserInteraction` cannot be set together with `scrollToBottom`.
30
+
27
31
### Returns
28
32
29
33
-`network/data/bytes`: page weight in bytes
@@ -80,3 +84,26 @@ tree:
80
84
- webpage-impact
81
85
inputs:
82
86
```
87
+
88
+
## Experimental: Custom user interactions
89
+
90
+
Example script:
91
+
92
+
```js
93
+
const userInteraction = async page => {
94
+
// on tngtech.com click on the "Leistungen" link
95
+
await page.locator('#menu > ul > li:nth-child(1) > a').click();
96
+
await page.waitForNavigation();
97
+
98
+
// for debugging purposes
99
+
await page.screenshot({
100
+
path: '/absolute/path/image.png',
101
+
});
102
+
};
103
+
104
+
exports.userInteraction = userInteraction;
105
+
```
106
+
107
+
Puppeteer docs on page interactions: https://pptr.dev/guides/page-interactions
0 commit comments