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.
How to answer a confirm?
One of the pages I am testing contains a button with an onclick event that uses confirm.
The message is shown and the user is expected to click the OK or Cancel button.
When I record the steps, nothing is entered in the script file for this click
I tried a few things in the =>verify, but no success.
What statement is needed in a script to click the OK button in this confirm box?
The message is shown and the user is expected to click the OK or Cancel button.
When I record the steps, nothing is entered in the script file for this click
I tried a few things in the =>verify, but no success.
What statement is needed in a script to click the OK button in this confirm box?
Answers
Please use _expectConfirm() API.
See the documentation for the same at :http://sahi.co.in/w/_expectconfirm
Note: Use this API before who triggers this confirm box.
like this
_expectConfirm("Some question?", false);
_click(_button("Click For Confirm"));
Regards,
Pratik Shah