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.
Unable to confirm dialogue box
Windows XP SP3
IE 8
Sahi Build 2011-07-19
I can successfully verify that a dialogue box appears by using the following
browser.expectConfirm("A letter code is required", true);
I however want to set focus to the popup and send an OK to close the popup. Please let me know if I need to send a screen shot of the popup. The title of the popup is Information -- Webpage Dialog and it is only an OK button
Thanks
Andrew
IE 8
Sahi Build 2011-07-19
I can successfully verify that a dialogue box appears by using the following
browser.expectConfirm("A letter code is required", true);
I however want to set focus to the popup and send an OK to close the popup. Please let me know if I need to send a screen shot of the popup. The title of the popup is Information -- Webpage Dialog and it is only an OK button
Thanks
Andrew
Comments
Sahi will automaticly behave as "Ok" where selected. If you need to get the text of that confirm, use _lastConfirm()
Does that solve your issue?
Regards
Wormi
Thanks so much for looking into this so quickly. I did try lastConfirm and that did not resolve my issue. Attached is my code
browser.expectConfirm("A letter code is required", true);
browser.button("Submit").click();
browser.lastConfirm();
The popup is not cleared. Does the Java API support anything like sendkeys so I can send a enter keystroke
Thanks
Andrew
there is an API for pressing keys http://sahi.co.in/w/_keypress
can you access the popup with the Sahi controller?
Could any other admin please look into this? As far as I know, confirms should not pop up, should they?
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_ENTER);
I have inserted a screenshot of the image
I will try and look at the code to see how this popup is being generated and will provide additional information
On further testing this seems to be related to the enviroment. Testing on another server I am able to access the popup with the Sahi controller?
Are there any logs that can assist us with determining why the one server is not allowing Sahi to communicate with the Popup. We have reviewed the configs on both the servers and do not see any differences that would cause this
Thanks
Andrew