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.
Not able to perform actions on another/child window.
Hi All,
According to my test scenario, I start with a http page, then after performing some actions on that page, I navigate to a https page. There, I click on a link from the https page, which opens in a new window. I want to perform some action on this window and then want to close it.
Once it is closed, I need to navigate back to http page from https page(base window).
My script is running fine, except performing action on that new window and closing it.
When I run the script, it navigates to https page, click on link and opens a new window. Then without doing anything (not even closing) on this window, control moves on to base window and navigates back to http page.
I have tried:
(new window does not have any title).
_popup("")._click(_link("abc"));
_popup("").closeWindow();
_popup("").close();
browser.popup("").close;
_keyPress(document.body, 115, "ALT"); //for pressing ALT+F4
But nothing works.
Note: This new window does not show _popup() as prefix on Sahi controller, so may be it should not be treated as popup, but _popup("").close(); works from Sahi controller during debugging. During run time, it does not work.
Kindly help in this problem.
Regards,
nagar.
According to my test scenario, I start with a http page, then after performing some actions on that page, I navigate to a https page. There, I click on a link from the https page, which opens in a new window. I want to perform some action on this window and then want to close it.
Once it is closed, I need to navigate back to http page from https page(base window).
My script is running fine, except performing action on that new window and closing it.
When I run the script, it navigates to https page, click on link and opens a new window. Then without doing anything (not even closing) on this window, control moves on to base window and navigates back to http page.
I have tried:
(new window does not have any title).
_popup("")._click(_link("abc"));
_popup("").closeWindow();
_popup("").close();
browser.popup("").close;
_keyPress(document.body, 115, "ALT"); //for pressing ALT+F4
But nothing works.
Note: This new window does not show _popup() as prefix on Sahi controller, so may be it should not be treated as popup, but _popup("").close(); works from Sahi controller during debugging. During run time, it does not work.
Kindly help in this problem.
Regards,
nagar.
Comments
So, my question is "How come Sahi opens a new window but doesn't record prefix of it?" "And, how to locate elements in such new window?"
Thanks!
for my application, when i click on the login button application will open in a new window. this new window is not loading while running through SAHI, if i login into the application manually, then the new window is loading.why is this happening and what is the solution for this.
thanks in advance.