Skip to Content

Welcome to the 

Sahi Pro Customer Portal

Access your tickets, forums, courses and more, all in one single place

Sign up

You need to be registered to interact with the community.
This question has been flagged
1 Reply
286 Views

Hi,

I have a scenario where I need to put a wait statement after every step due to some application issue. 

I don't want to put a wait statement after every step. Is there any way I can control the speed of the execution? 


Thanks

Avatar
Discard

Hi Arthur,

By default, Sahi Pro automatically waits for page loads, AJAX activity, and element readiness using its built-in smart waiting mechanism.

Sahi also has a default step interval of 100ms, so it already pauses briefly between actions without needing explicit waits.

If your application still requires a slower execution pace, you can manually control the speed.

 Use _setSpeed() to slow down execution

Place _setSpeed() before your test steps to introduce a uniform delay after each action:

_setSpeed(2000);   // Adds 2 seconds delay between every step

This avoids having to write _wait() after every line and is the recommended way to globally slow down the script execution.

You can find the official Sahi Pro API documentation for more information on _setSpeed() API.

https://resources.sahipro.com/docs/sahi-apis/script-execution-control-apis.html#_setSpeed


Avatar
Discard