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 Handle Message Boxes
HI am quite new to web testing automation and sahi . i tried using _expect Confirm to check "ok" for the confirmation Dilogue box on logout from some site.
but i could not get it right.
click on logout triggers the Dilogue for confirmation. i tried
_expectConfirm("Do you want to logout?",true);
_click(_link("Logout"));
and
_click(_link("Logout"));
_expectConfirm("Do you want to logout?",true);
please help me in this regard.
but i could not get it right.
click on logout triggers the Dilogue for confirmation. i tried
_expectConfirm("Do you want to logout?",true);
_click(_link("Logout"));
and
_click(_link("Logout"));
_expectConfirm("Do you want to logout?",true);
please help me in this regard.
Comments
Can you share what kind of error message you receive in case it fails?
Also cross verify that the text appearing in the dialog box is exactly the same as in _expectConfirm()..i mean any extra spaces or new line character etc.
Regards,
Pankaj.
I don't get any error message. sahi playback window shows all steps executed properly.
it clickes on the logout link aswell, i also see the confirmation dialogue box in the play back but nothing happens to it.
neither OK(true) nor Cancel (False).
i had look at similar posts.
supposing the confirmation window has some thing like
"are you sure to logout ?
logging out means that you loose connection to data etct etc ......................................
press okay to continue or cancel to stay on."
should my "Label" in the call to expectConfirm("Label",value) contain all the readable text or just part of it is sufficient ?