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.
Sahi popup window
Hi,
My application has several popup windows opening from javascript validations. Sahi is not recognizing those. If i manually add it like
_popup("windowTitle"),
It says no such window found. The windows are not javascript popups but normal html pages opening as popups.
Plz help.
My application has several popup windows opening from javascript validations. Sahi is not recognizing those. If i manually add it like
_popup("windowTitle"),
It says no such window found. The windows are not javascript popups but normal html pages opening as popups.
Plz help.
Answers
Here the title it is recognizing is actually the parent window title.
What do you get in the prefix tab of the controller, when you ctrl over(try to find accessor of) any element on the opened popup window?
Regards.
you can use the following command.
Also, if you would like to perform some action i.e. lets say clicking a button in the opened popup,
You can use the following code:
For details about how to use the above mentioned APIs,
search for _popup and _selectWindow in the following page:
Regards.
control hower doesnot happen on the popup window. It comes when some error happens.
_selectWindow() or _popup() hence do not work.
Perform the action which causes a error and hence the popup on the sahi browser manually. Bring up the controller, from which you can get the exact popup name.
Once you get the popup name, you can use the above code suggested by Pratyush
i.e
_popup("<your_title>")._click(_button("<your_button>));
1) onclick="javascript:LoginClear(document.Login)"
2)onclick="Javascript:openWindow('../SECURITY/PCSEC_PROCESS.jsp')"
If it is the 2nd case, the window opens as the name is visible in the code.. But the window which comes due to 1st case is not recognised.
I cannot give the URL as it is an internal application