playwright-ts-automationframework 1.1.57 → 1.1.58
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/lib/core/actions.core.d.ts +4 -4
- package/lib/core/actions.core.js +16 -10
- package/package.json +4 -4
|
@@ -336,10 +336,10 @@ export declare class Actions extends BasePage {
|
|
|
336
336
|
*/
|
|
337
337
|
sleep(timeInSeconds?: number): Promise<void>;
|
|
338
338
|
waitForPageTimeout(timeoutInSeconds?: number): Promise<void>;
|
|
339
|
-
waitForPageLoad(): Promise<void>;
|
|
340
|
-
waitForPageDOMcontentLoaded(): Promise<void>;
|
|
341
|
-
waitForNetworkIdle(): Promise<void>;
|
|
342
|
-
refreshWebPage(): Promise<void>;
|
|
339
|
+
waitForPageLoad(timeInSeconds?: number): Promise<void>;
|
|
340
|
+
waitForPageDOMcontentLoaded(timeInSeconds?: number): Promise<void>;
|
|
341
|
+
waitForNetworkIdle(timeInSeconds?: number): Promise<void>;
|
|
342
|
+
refreshWebPage(timeInSeconds?: number): Promise<void>;
|
|
343
343
|
/**
|
|
344
344
|
* Close the browser instance
|
|
345
345
|
*
|
package/lib/core/actions.core.js
CHANGED
|
@@ -597,7 +597,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
597
597
|
case 2:
|
|
598
598
|
error_4 = _a.sent();
|
|
599
599
|
(0, logs_core_1.logError)("\u274C Unable to read attribute value from '".concat(control.controlDescription, "' - Reason: ").concat(error_4));
|
|
600
|
-
return [2 /*return*/,
|
|
600
|
+
return [2 /*return*/, ''];
|
|
601
601
|
case 3: return [2 /*return*/];
|
|
602
602
|
}
|
|
603
603
|
});
|
|
@@ -980,10 +980,11 @@ var Actions = /** @class */ (function (_super) {
|
|
|
980
980
|
});
|
|
981
981
|
};
|
|
982
982
|
Actions.prototype.waitForPageLoad = function () {
|
|
983
|
-
return __awaiter(this,
|
|
983
|
+
return __awaiter(this, arguments, void 0, function (timeInSeconds) {
|
|
984
|
+
if (timeInSeconds === void 0) { timeInSeconds = 30; }
|
|
984
985
|
return __generator(this, function (_a) {
|
|
985
986
|
switch (_a.label) {
|
|
986
|
-
case 0: return [4 /*yield*/, this.page.waitForLoadState("load")];
|
|
987
|
+
case 0: return [4 /*yield*/, this.page.waitForLoadState("load", { timeout: timeInSeconds * 1000 })];
|
|
987
988
|
case 1:
|
|
988
989
|
_a.sent();
|
|
989
990
|
return [2 /*return*/];
|
|
@@ -992,10 +993,11 @@ var Actions = /** @class */ (function (_super) {
|
|
|
992
993
|
});
|
|
993
994
|
};
|
|
994
995
|
Actions.prototype.waitForPageDOMcontentLoaded = function () {
|
|
995
|
-
return __awaiter(this,
|
|
996
|
+
return __awaiter(this, arguments, void 0, function (timeInSeconds) {
|
|
997
|
+
if (timeInSeconds === void 0) { timeInSeconds = 30; }
|
|
996
998
|
return __generator(this, function (_a) {
|
|
997
999
|
switch (_a.label) {
|
|
998
|
-
case 0: return [4 /*yield*/, this.page.waitForLoadState("domcontentloaded")];
|
|
1000
|
+
case 0: return [4 /*yield*/, this.page.waitForLoadState("domcontentloaded", { timeout: timeInSeconds * 1000 })];
|
|
999
1001
|
case 1:
|
|
1000
1002
|
_a.sent();
|
|
1001
1003
|
return [2 /*return*/];
|
|
@@ -1004,10 +1006,11 @@ var Actions = /** @class */ (function (_super) {
|
|
|
1004
1006
|
});
|
|
1005
1007
|
};
|
|
1006
1008
|
Actions.prototype.waitForNetworkIdle = function () {
|
|
1007
|
-
return __awaiter(this,
|
|
1009
|
+
return __awaiter(this, arguments, void 0, function (timeInSeconds) {
|
|
1010
|
+
if (timeInSeconds === void 0) { timeInSeconds = 30; }
|
|
1008
1011
|
return __generator(this, function (_a) {
|
|
1009
1012
|
switch (_a.label) {
|
|
1010
|
-
case 0: return [4 /*yield*/, this.page.waitForLoadState("networkidle")];
|
|
1013
|
+
case 0: return [4 /*yield*/, this.page.waitForLoadState("networkidle", { timeout: timeInSeconds * 1000 })];
|
|
1011
1014
|
case 1:
|
|
1012
1015
|
_a.sent();
|
|
1013
1016
|
return [2 /*return*/];
|
|
@@ -1016,10 +1019,11 @@ var Actions = /** @class */ (function (_super) {
|
|
|
1016
1019
|
});
|
|
1017
1020
|
};
|
|
1018
1021
|
Actions.prototype.refreshWebPage = function () {
|
|
1019
|
-
return __awaiter(this,
|
|
1022
|
+
return __awaiter(this, arguments, void 0, function (timeInSeconds) {
|
|
1023
|
+
if (timeInSeconds === void 0) { timeInSeconds = 30; }
|
|
1020
1024
|
return __generator(this, function (_a) {
|
|
1021
1025
|
switch (_a.label) {
|
|
1022
|
-
case 0: return [4 /*yield*/, this.page.reload()];
|
|
1026
|
+
case 0: return [4 /*yield*/, this.page.reload({ waitUntil: "load", timeout: timeInSeconds * 1000 })];
|
|
1023
1027
|
case 1:
|
|
1024
1028
|
_a.sent();
|
|
1025
1029
|
return [2 /*return*/];
|
|
@@ -1037,7 +1041,9 @@ var Actions = /** @class */ (function (_super) {
|
|
|
1037
1041
|
return __generator(this, function (_a) {
|
|
1038
1042
|
switch (_a.label) {
|
|
1039
1043
|
case 0: return [4 /*yield*/, this.page.close()];
|
|
1040
|
-
case 1:
|
|
1044
|
+
case 1:
|
|
1045
|
+
_a.sent();
|
|
1046
|
+
return [2 /*return*/];
|
|
1041
1047
|
}
|
|
1042
1048
|
});
|
|
1043
1049
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright-ts-automationframework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.58",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"ignore-case": "^0.1.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@playwright/test": "^1.
|
|
23
|
-
"@types/node": "^
|
|
22
|
+
"@playwright/test": "^1.53.0",
|
|
23
|
+
"@types/node": "^24.0.0",
|
|
24
24
|
"log4js": "^6.9.1",
|
|
25
25
|
"nodemailer": "^7.0.3",
|
|
26
|
-
"npm": "^11.4.
|
|
26
|
+
"npm": "^11.4.1",
|
|
27
27
|
"path": "^0.12.7",
|
|
28
28
|
"typescript": "^5.8.3"
|
|
29
29
|
},
|