18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Clear _lastAlert value
Hi,
I am running a test scenario in for loop.
So in this test case i may get some alerts or may not based on tests.
So i am checking that value using " _lastAlert() " .
Suppose in first iteration i get alert "Hi Vikram". so _lastAlert will have value "Hi Vikram".
And in second iteration if no popups generated , in that case _lastAlert will have value "Hi Vikram".
So i want to clear _lastAlert value in each iteration....
Thanks
Vikram
I am running a test scenario in for loop.
So in this test case i may get some alerts or may not based on tests.
So i am checking that value using " _lastAlert() " .
Suppose in first iteration i get alert "Hi Vikram". so _lastAlert will have value "Hi Vikram".
And in second iteration if no popups generated , in that case _lastAlert will have value "Hi Vikram".
So i want to clear _lastAlert value in each iteration....
Thanks
Vikram
Comments
You can use _clearLastAlert();// Clears the value returned by _lastAlert().
Regards
Sumitra