playwright-ts-automationframework 1.1.35 → 1.1.37
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.js
CHANGED
|
@@ -381,7 +381,10 @@ var Actions = /** @class */ (function (_super) {
|
|
|
381
381
|
case 0: return [4 /*yield*/, control.controlLocator.first().isChecked()];
|
|
382
382
|
case 1:
|
|
383
383
|
isChecked = _a.sent();
|
|
384
|
-
|
|
384
|
+
if (isChecked)
|
|
385
|
+
(0, logs_core_1.logConsole)("".concat(control.controlDescription, " is selected"));
|
|
386
|
+
else
|
|
387
|
+
(0, logs_core_1.logConsole)("".concat(control.controlDescription, " is NOT selected"));
|
|
385
388
|
return [2 /*return*/, isChecked];
|
|
386
389
|
}
|
|
387
390
|
});
|
|
@@ -404,7 +407,10 @@ var Actions = /** @class */ (function (_super) {
|
|
|
404
407
|
return __generator(this, function (_a) {
|
|
405
408
|
switch (_a.label) {
|
|
406
409
|
case 0: return [4 /*yield*/, control.controlLocator.first().isEnabled().then(function (value) {
|
|
407
|
-
|
|
410
|
+
if (value)
|
|
411
|
+
(0, logs_core_1.logConsole)("".concat(control.controlDescription, " is enabled"));
|
|
412
|
+
else
|
|
413
|
+
(0, logs_core_1.logConsole)("".concat(control.controlDescription, " is NOT enabled"));
|
|
408
414
|
return value;
|
|
409
415
|
})];
|
|
410
416
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -432,7 +438,10 @@ var Actions = /** @class */ (function (_super) {
|
|
|
432
438
|
case 0: return [4 /*yield*/, control.controlLocator.first().isVisible()];
|
|
433
439
|
case 1:
|
|
434
440
|
isVisible = _a.sent();
|
|
435
|
-
|
|
441
|
+
if (isVisible)
|
|
442
|
+
(0, logs_core_1.logConsole)("".concat(control.controlDescription, " is displayed"));
|
|
443
|
+
else
|
|
444
|
+
(0, logs_core_1.logConsole)("".concat(control.controlDescription, " is NOT displayed"));
|
|
436
445
|
return [2 /*return*/, isVisible];
|
|
437
446
|
}
|
|
438
447
|
});
|
|
@@ -765,7 +774,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
765
774
|
_a.label = 2;
|
|
766
775
|
case 2:
|
|
767
776
|
_a.trys.push([2, 4, , 5]);
|
|
768
|
-
return [4 /*yield*/, control.controlLocator.waitFor({
|
|
777
|
+
return [4 /*yield*/, control.controlLocator.first().waitFor({
|
|
769
778
|
state: "visible",
|
|
770
779
|
timeout: timeoutInSeconds * 1000,
|
|
771
780
|
})];
|
|
@@ -803,7 +812,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
803
812
|
_a.label = 2;
|
|
804
813
|
case 2:
|
|
805
814
|
_a.trys.push([2, 4, , 5]);
|
|
806
|
-
return [4 /*yield*/, control.controlLocator.waitFor({
|
|
815
|
+
return [4 /*yield*/, control.controlLocator.first().waitFor({
|
|
807
816
|
state: "attached",
|
|
808
817
|
timeout: timeoutInSeconds * 1000,
|
|
809
818
|
})];
|
|
@@ -308,7 +308,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
308
308
|
case 1:
|
|
309
309
|
_a.sent();
|
|
310
310
|
_a.label = 2;
|
|
311
|
-
case 2: return [4 /*yield*/, control.controlLocator.isEnabled().then(function (value) {
|
|
311
|
+
case 2: return [4 /*yield*/, control.controlLocator.first().isEnabled().then(function (value) {
|
|
312
312
|
var verificationResult = value === expValue ? "PASSED" : "FAILED";
|
|
313
313
|
var logText = "VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' enabled status is: '").concat(value, "' Expected: ").concat(expValue);
|
|
314
314
|
(0, logs_core_1.logVerification)(logText);
|
|
@@ -341,7 +341,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
341
341
|
case 1:
|
|
342
342
|
_a.sent();
|
|
343
343
|
_a.label = 2;
|
|
344
|
-
case 2: return [4 /*yield*/, control.controlLocator.isChecked().then(function (isChecked) {
|
|
344
|
+
case 2: return [4 /*yield*/, control.controlLocator.first().isChecked().then(function (isChecked) {
|
|
345
345
|
var verificationResult = isChecked === expValue ? "PASSED" : "FAILED";
|
|
346
346
|
var logText = "VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' selected status is: '").concat(isChecked, "' Expected: ").concat(expValue);
|
|
347
347
|
(0, logs_core_1.logVerification)(logText);
|
|
@@ -457,7 +457,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
457
457
|
return __awaiter(this, void 0, void 0, function () {
|
|
458
458
|
return __generator(this, function (_a) {
|
|
459
459
|
switch (_a.label) {
|
|
460
|
-
case 0: return [4 /*yield*/, control.controlLocator.getAttribute("value").then(function (value) {
|
|
460
|
+
case 0: return [4 /*yield*/, control.controlLocator.first().getAttribute("value").then(function (value) {
|
|
461
461
|
var verificationResult = value === expectedText ? "PASSED" : "FAILED";
|
|
462
462
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify textbox value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
463
463
|
(0, logs_core_1.logVerification)(logText);
|
|
@@ -517,7 +517,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
517
517
|
return __generator(this, function (_a) {
|
|
518
518
|
switch (_a.label) {
|
|
519
519
|
case 0:
|
|
520
|
-
parent = control.controlLocator;
|
|
520
|
+
parent = control.controlLocator.first();
|
|
521
521
|
if (!(parent != null)) return [3 /*break*/, 2];
|
|
522
522
|
return [4 /*yield*/, parent.evaluate(function (e) { return e.tagName; })];
|
|
523
523
|
case 1:
|