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.
Batch mode needs someone to click in a button
Hi Narayan.
Everytime that I run my scripts in batch mode I need to click in the button "No":

Translation:
It's required by the system that the user makes login. When it happens with the Sahi Controller, this dialog doesn't comes up, neither when someone access the system. But when the test is running through batch mode the dialog comes up, and if I click in the "Yes" button the test fails.
Is there anyway to make this without needing someone to click in the button?
Everytime that I run my scripts in batch mode I need to click in the button "No":

Translation:
The Web page that you are visiting is trying to close the window.
Do you want to close the window?
Yes No
It's required by the system that the user makes login. When it happens with the Sahi Controller, this dialog doesn't comes up, neither when someone access the system. But when the test is running through batch mode the dialog comes up, and if I click in the "Yes" button the test fails.
Is there anyway to make this without needing someone to click in the button?
Comments
Page 1 opens Page 2 and Page 1 is closed, either by Page 1 or Page 2
When I run the script by the Sahi Controller, the main window isn't closed, neither when someone is using the system this happens.
Only when I run scripts in batch mode something try to close the window.
1) Create a test with just a couple of steps navigating from one link to another in your application
2) Add just that single test in your suite file and run the suite. Make sure that your start URL in the batch file/ant target is correct.
3) Check if the error still occurs, and if yes, email the script, suite file, log file and batch file/ant target to support@sahi.co.in . We will have a look at it and let you know.
One other work around, is to press tab and then space using java.awt.Robot to simulate clicking on "no". You can add the code below to your script, at the place it throws the prompt.
This will work only if the window is in focus, so this is not a recommended solution.
Regards,
Narayan
It didn't work and yes, I have a window.close here, but it only executes when already exists a window with the same name, but they are all closed before the execution of the suite.
I will email you soon, thanks.