playwright-ts-automationframework 1.0.3 → 1.0.4

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.
@@ -247,6 +247,17 @@ export declare class Actions extends BasePage {
247
247
  * let alertMsg = getAlertDialogMessage();
248
248
  */
249
249
  getAlertDialogMessage(): Promise<Page>;
250
+ /**
251
+ * Return all elements for given search criteria.
252
+ *
253
+ * @param WebControl Control on which user want to click.
254
+ *
255
+ * Example:
256
+ *
257
+ * dateColumn = new WebControl(this.page.locator('#date'), 'Date Column values');
258
+ *
259
+ * findAll(dateColumn);
260
+ */
250
261
  findAll(control: WebControl): Promise<import("playwright-core").Locator[]>;
251
262
  /**
252
263
  * Read the web URL
@@ -320,4 +331,10 @@ export declare class Actions extends BasePage {
320
331
  * sleep(10);
321
332
  */
322
333
  sleep(milliseconds?: number): Promise<unknown>;
334
+ /**
335
+ * Close the browser instance
336
+ *
337
+ * closeBrowser();
338
+ */
339
+ closeBrowser(): Promise<void>;
323
340
  }
@@ -619,6 +619,17 @@ var Actions = /** @class */ (function (_super) {
619
619
  });
620
620
  });
621
621
  };
622
+ /**
623
+ * Return all elements for given search criteria.
624
+ *
625
+ * @param WebControl Control on which user want to click.
626
+ *
627
+ * Example:
628
+ *
629
+ * dateColumn = new WebControl(this.page.locator('#date'), 'Date Column values');
630
+ *
631
+ * findAll(dateColumn);
632
+ */
622
633
  Actions.prototype.findAll = function (control) {
623
634
  return __awaiter(this, void 0, void 0, function () {
624
635
  var allElements;
@@ -824,6 +835,21 @@ var Actions = /** @class */ (function (_super) {
824
835
  });
825
836
  });
826
837
  };
838
+ /**
839
+ * Close the browser instance
840
+ *
841
+ * closeBrowser();
842
+ */
843
+ Actions.prototype.closeBrowser = function () {
844
+ return __awaiter(this, void 0, void 0, function () {
845
+ return __generator(this, function (_a) {
846
+ switch (_a.label) {
847
+ case 0: return [4 /*yield*/, this.page.close()];
848
+ case 1: return [2 /*return*/, _a.sent()];
849
+ }
850
+ });
851
+ });
852
+ };
827
853
  return Actions;
828
854
  }(basePage_core_1.BasePage));
829
855
  exports.Actions = Actions;
@@ -52,13 +52,13 @@ var Configuration = /** @class */ (function () {
52
52
  });
53
53
  Object.defineProperty(Configuration, "configurationData", {
54
54
  get: function () {
55
- if (Configuration.environment.toUpperCase() == "QA") {
55
+ if (Configuration.environment.toUpperCase().includes("QA")) {
56
56
  return appConfigurations.QA;
57
57
  }
58
- else if (Configuration.environment.toUpperCase() == "STAGE") {
58
+ else if (Configuration.environment.toUpperCase().includes("STAG")) {
59
59
  return appConfigurations.STAGE;
60
60
  }
61
- else if (Configuration.environment.toUpperCase() == "PROD") {
61
+ else if (Configuration.environment.toUpperCase().includes("PROD")) {
62
62
  return appConfigurations.PROD;
63
63
  }
64
64
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-ts-automationframework",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",