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
27
27
28
+
Experimental:
29
+
30
+
-`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`.
31
+
28
32
### Returns
29
33
30
34
-`network/data/bytes`: page weight in bytes
@@ -81,3 +85,26 @@ tree:
81
85
- webpage-impact
82
86
inputs:
83
87
```
88
+
89
+
## Experimental: Custom user interactions
90
+
91
+
Example script:
92
+
93
+
```js
94
+
const userInteraction = async page => {
95
+
// on tngtech.com click on the "Leistungen" link
96
+
await page.locator('#menu > ul > li:nth-child(1) > a').click();
97
+
await page.waitForNavigation();
98
+
99
+
// for debugging purposes
100
+
await page.screenshot({
101
+
path: '/absolute/path/image.png',
102
+
});
103
+
};
104
+
105
+
exports.userInteraction = userInteraction;
106
+
```
107
+
108
+
Puppeteer docs on page interactions: https://pptr.dev/guides/page-interactions
0 commit comments