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.
dealing with popup
Hi,
I am facing problem while dealing with popups. we have delete button,on clicking this user should be deleted.While deleting getting 2 popups.
first popup shows the message "Do u want to delete the selected user" with ok,cancel buttons
second popup shows the message"the selected user deleted" with ok button
while playback first popup is ok,but unable to deal with second popup
but sahi cantroller is showing playback SUCEESS message and in logs also getting 100% succcess rate
I am using sahi3.5. Previously i didnt face this problem.
can u help me to resolve this
thanks
sreenivas
I am facing problem while dealing with popups. we have delete button,on clicking this user should be deleted.While deleting getting 2 popups.
first popup shows the message "Do u want to delete the selected user" with ok,cancel buttons
second popup shows the message"the selected user deleted" with ok button
while playback first popup is ok,but unable to deal with second popup
but sahi cantroller is showing playback SUCEESS message and in logs also getting 100% succcess rate
I am using sahi3.5. Previously i didnt face this problem.
can u help me to resolve this
thanks
sreenivas
Comments
For first popup you are might be using following command to confirm the delete action.
_expectConfirm($label, true);
And for second popup you are talking is kind of alert message. And as per my knowledge sahi deals with it by default. So if you write some other command after using above command for confirmation of delete.
The second popup you are talking will be closed it self during execution. This is basically sahi's functionality. I am using it with my scripts and its working fine.
Ex.
Some steps.
_click(_button("Delete"));
var $label = "Some text which is there on popup window";
_expectConfirm($label, true);
///Scripts continue with other steps....////
_click(_button("something something"));
..
.
.
In short there is no need of any specific code for click on 'OK' button of that second popup. Sahi will handle it self.
Hope this will help you.
Thanks for ur reply. I tried with your suggested statement _expectConfirm($label, true);
before both the popups and got the message on the those popups. Playback also showes 100% success rate. But in my application 2nd popup wasnt closed atomatically.Still facing the same problem.
This script i recorded earlier and worked fine for the past build.
can anyone suggest me to solve this
Thanks
sreenivas
So i think you want to do some assert or verify kind of stuff with that second pop up window.
If is it so than you can use below method.
_clearLastAlert();
_click(_button("Delete"));
if(_lastAlert() == "Some Text on that second popup window")
{
$result = "Passed";
}
else
{
$result = "Failed";
}
this thing can help you to verify the content of that second pop up window which is handled by SAHI by default.
Hope this will help you.
Thanks for your response.But i don't want to capture the message on the popup.
My requirement is that OK button on the second popup should be clicked automatically when i run the script so that the row of the data will be deleted.
But my script is not clicking that conformation popup and script is showing 100% success rate.
can u suggest me to solve this.
Thanks
sreenivas
If you are still stuck, should we set up another gotomeeting session with you?
Regards,
Narayan
Thanks for your response. I am ready to have a session on this.
Can u tell me your convenient time for the session.
Thanks
sreenivas
I am kapil using your Sahi v 3.5 autom tool for website testing , but experiencing some problems such as
1. when i start the recording application shows Combo Error Message . how to overcome?
2. how to increase execution time for perticuler step?
regards,
kapil
Please create a new forum post.
Can you tell me what Combo error message are you getting and what exactly happens when you start recording?
Use _wait(timeInMilliseconds, condition); to increase the execution time for a particular step.
For more information:
http://sahi.co.in/w/_wait
Regards
Sumitra