graceful-playwright 1.1.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/core.d.ts +2 -0
- package/core.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/core.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export declare class GracefulPage {
|
|
|
40
40
|
autoRetryWhenFailed<T>(f: () => T | Promise<T>): Promise<T>;
|
|
41
41
|
/** @description proxy method to (await this.getPage()).evaluate */
|
|
42
42
|
evaluate: Page['evaluate'];
|
|
43
|
+
/** @description proxy method to (await this.getPage()).waitForSelector */
|
|
44
|
+
waitForSelector: Page['waitForSelector'];
|
|
43
45
|
/** @description proxy method to (await this.getPage()).fill */
|
|
44
46
|
fill: Page['fill'];
|
|
45
47
|
/** @description proxy method to (await this.getPage()).click */
|
package/core.js
CHANGED
|
@@ -62,6 +62,7 @@ class GracefulPage {
|
|
|
62
62
|
message.includes('ERR_SOCKET_NOT_CONNECTED') ||
|
|
63
63
|
message.includes('ERR_ABORTED') ||
|
|
64
64
|
message.includes('ERR_ADDRESS_UNREACHABLE') ||
|
|
65
|
+
message.includes('ERR_NETWORK_IO_SUSPENDED') ||
|
|
65
66
|
/page crashed/i.test(message);
|
|
66
67
|
if (isKnownError) {
|
|
67
68
|
this.getOnError()(error);
|
|
@@ -98,6 +99,11 @@ class GracefulPage {
|
|
|
98
99
|
let page = await this.getPage();
|
|
99
100
|
return await page.evaluate(pageFunction, arg);
|
|
100
101
|
};
|
|
102
|
+
/** @description proxy method to (await this.getPage()).waitForSelector */
|
|
103
|
+
waitForSelector = async (selector, options) => {
|
|
104
|
+
let page = await this.getPage();
|
|
105
|
+
return await page.waitForSelector(selector, options);
|
|
106
|
+
};
|
|
101
107
|
/** @description proxy method to (await this.getPage()).fill */
|
|
102
108
|
fill = async (selector, value, options) => {
|
|
103
109
|
let page = await this.getPage();
|