Sleep
The Sleep class is an useful action for introducing delays in test scenarios, allowing for better synchronization with the system under test. This performs the action of pausing the test execution for the specified interval.
This Action does not rely on a specific Ability.
deprecated
This action is deprecated and will be removed in the future. Please use Pause from Testla Screenplay Essentials instead.
Extends
This class extends the abstract Action class from Core.
Methods
performAs
public async performAs(): Promise<void>;
- Description: Pause the execution of further test steps for the specified interval in milliseconds.
- Parameters: None
- Returns:
Promise<void>- A promise that resolves when the pause is complete.
for
public static for(ms: number): Sleep;
- Description: Create a new instance of the
Sleepclass with a specified duration. - Parameters:
ms- The interval in milliseconds for which the test execution will be paused.
- Returns:
Sleep- A new instance of theSleepclass.