playwright-ts-automationframework 1.1.23 → 1.1.25
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.
|
@@ -56,6 +56,7 @@ export declare class Actions extends BasePage {
|
|
|
56
56
|
* type(usernameTxtbx);
|
|
57
57
|
*/
|
|
58
58
|
type(control: WebControl, textTobeEntered: string): Promise<void>;
|
|
59
|
+
typePassword(control: WebControl, textTobeEntered: string): Promise<void>;
|
|
59
60
|
/**
|
|
60
61
|
* Press Keyboard event.
|
|
61
62
|
*
|
|
@@ -333,6 +334,7 @@ export declare class Actions extends BasePage {
|
|
|
333
334
|
sleep(timeInSeconds?: number): Promise<void>;
|
|
334
335
|
waitForPageTimeout(timeoutInSeconds?: number): Promise<void>;
|
|
335
336
|
waitForNetworkIdle(): Promise<void>;
|
|
337
|
+
refreshWebPage(): Promise<void>;
|
|
336
338
|
/**
|
|
337
339
|
* Close the browser instance
|
|
338
340
|
*
|
package/lib/core/actions.core.js
CHANGED
|
@@ -181,6 +181,28 @@ var Actions = /** @class */ (function (_super) {
|
|
|
181
181
|
});
|
|
182
182
|
});
|
|
183
183
|
};
|
|
184
|
+
Actions.prototype.typePassword = function (control, textTobeEntered) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
186
|
+
return __generator(this, function (_a) {
|
|
187
|
+
switch (_a.label) {
|
|
188
|
+
case 0: return [4 /*yield*/, control.controlLocator.first().fill(textTobeEntered).then(function () {
|
|
189
|
+
if (control.controlDescription.trim().toLowerCase().endsWith('textbox')) {
|
|
190
|
+
(0, logs_core_1.logAction)("Entered '********' in '" + control.controlDescription + "'");
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
(0, logs_core_1.logAction)("Entered '********' in '" + control.controlDescription + "' textbox");
|
|
194
|
+
}
|
|
195
|
+
}, function (error) {
|
|
196
|
+
(0, logs_core_1.logError)("Unable to enter text in '" + control.controlDescription + "' textbox due to reason: " + error);
|
|
197
|
+
throw error;
|
|
198
|
+
})];
|
|
199
|
+
case 1:
|
|
200
|
+
_a.sent();
|
|
201
|
+
return [2 /*return*/];
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
};
|
|
184
206
|
/**
|
|
185
207
|
* Press Keyboard event.
|
|
186
208
|
*
|
|
@@ -877,6 +899,18 @@ var Actions = /** @class */ (function (_super) {
|
|
|
877
899
|
});
|
|
878
900
|
});
|
|
879
901
|
};
|
|
902
|
+
Actions.prototype.refreshWebPage = function () {
|
|
903
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
904
|
+
return __generator(this, function (_a) {
|
|
905
|
+
switch (_a.label) {
|
|
906
|
+
case 0: return [4 /*yield*/, this.page.reload()];
|
|
907
|
+
case 1:
|
|
908
|
+
_a.sent();
|
|
909
|
+
return [2 /*return*/];
|
|
910
|
+
}
|
|
911
|
+
});
|
|
912
|
+
});
|
|
913
|
+
};
|
|
880
914
|
/**
|
|
881
915
|
* Close the browser instance
|
|
882
916
|
*
|
|
@@ -180,7 +180,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
180
180
|
switch (_a.label) {
|
|
181
181
|
case 0:
|
|
182
182
|
verificationResult = value === true ? "PASSED" : "FAILED";
|
|
183
|
-
logText = "VERIFICATION: ".concat(verificationResult, ". '").concat(control.controlDescription, "' hidden status is '").concat(value, "' Expected:
|
|
183
|
+
logText = "VERIFICATION: ".concat(verificationResult, ". '").concat(control.controlDescription, "' hidden status is '").concat(value, "' Expected: true");
|
|
184
184
|
(0, logs_core_1.logVerification)(logText);
|
|
185
185
|
return [4 /*yield*/, (0, test_1.expect)(element, logText).toBeHidden()];
|
|
186
186
|
case 1:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright-ts-automationframework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"nodemailer": "^6.9.15",
|
|
26
26
|
"npm": "^10.9.0",
|
|
27
27
|
"path": "^0.12.7",
|
|
28
|
+
"playwright-ts-automationframework": "file:",
|
|
28
29
|
"typescript": "^5.6.3"
|
|
29
30
|
},
|
|
30
31
|
"files": [
|