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.
Handling Message Box actions
Hi There,
I have recorded a script for message box "Cancel" action.
_expectConfirm("Are you sure you want to close this?", false);
While playback it is taking action "Ok" by default. But I have to click "Cancel" according to my testcase. How to handle this.
Please help me on this.
Thanks,
Ramu...
I have recorded a script for message box "Cancel" action.
_expectConfirm("Are you sure you want to close this?", false);
While playback it is taking action "Ok" by default. But I have to click "Cancel" according to my testcase. How to handle this.
Please help me on this.
Thanks,
Ramu...
Best Answer
-
Hi Ramu,
Your _expectConfirm statement is correct.
However, you need to add that statement before the action that brings up your message box.
Regards.