playwright-ts-automationframework 1.1.12 → 1.1.13
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.
|
@@ -324,13 +324,13 @@ export declare class Actions extends BasePage {
|
|
|
324
324
|
/**
|
|
325
325
|
* Wait for execution to stop for given time
|
|
326
326
|
*
|
|
327
|
-
* @param
|
|
327
|
+
* @param timeInSeconds Time for which executed should halt in seconds
|
|
328
328
|
*
|
|
329
329
|
* Example:
|
|
330
330
|
*
|
|
331
331
|
* sleep(10);
|
|
332
332
|
*/
|
|
333
|
-
sleep(
|
|
333
|
+
sleep(timeInSeconds?: number): Promise<unknown>;
|
|
334
334
|
/**
|
|
335
335
|
* Close the browser instance
|
|
336
336
|
*
|
package/lib/core/actions.core.js
CHANGED
|
@@ -819,18 +819,18 @@ var Actions = /** @class */ (function (_super) {
|
|
|
819
819
|
/**
|
|
820
820
|
* Wait for execution to stop for given time
|
|
821
821
|
*
|
|
822
|
-
* @param
|
|
822
|
+
* @param timeInSeconds Time for which executed should halt in seconds
|
|
823
823
|
*
|
|
824
824
|
* Example:
|
|
825
825
|
*
|
|
826
826
|
* sleep(10);
|
|
827
827
|
*/
|
|
828
828
|
Actions.prototype.sleep = function () {
|
|
829
|
-
return __awaiter(this, arguments, void 0, function (
|
|
830
|
-
if (
|
|
829
|
+
return __awaiter(this, arguments, void 0, function (timeInSeconds) {
|
|
830
|
+
if (timeInSeconds === void 0) { timeInSeconds = 5; }
|
|
831
831
|
return __generator(this, function (_a) {
|
|
832
832
|
switch (_a.label) {
|
|
833
|
-
case 0: return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve,
|
|
833
|
+
case 0: return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, timeInSeconds * 1000); })];
|
|
834
834
|
case 1: return [2 /*return*/, _a.sent()];
|
|
835
835
|
}
|
|
836
836
|
});
|