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.
Dealing with Popup window
Hi,
I am trying to get the name of the subsequent window name. While I do a recording the next window is recorded as pop up.
There is one main browser and when I click a link on that the script gets generated as :
_click(_link("Data Service Manager")).
The above click will open a new pop up browser. and when I clcik the link on that popup browser I get the script as
_popup("12")._click(_link("Billing event"));
My question is how do I get the name of that pop up browser.
I tried this way. Its only returning the main window name and not the pop up window name. How do I get that pop up window name.
_click(_link("Data Services Manager"));
_wait(10000);
_alert(getTitle());
<browser>
function getTitle(){
return(top.document.title);
}
</browser>
Pls help me.
thanks and regards,
kaushik
I am trying to get the name of the subsequent window name. While I do a recording the next window is recorded as pop up.
There is one main browser and when I click a link on that the script gets generated as :
_click(_link("Data Service Manager")).
The above click will open a new pop up browser. and when I clcik the link on that popup browser I get the script as
_popup("12")._click(_link("Billing event"));
My question is how do I get the name of that pop up browser.
I tried this way. Its only returning the main window name and not the pop up window name. How do I get that pop up window name.
_click(_link("Data Services Manager"));
_wait(10000);
_alert(getTitle());
<browser>
function getTitle(){
return(top.document.title);
}
</browser>
Pls help me.
thanks and regards,
kaushik
Comments
_popup("12")._alert(getTitle());
From my experience, to run a command in a popup window ... the command should look something like this:
_popup("popupWinName")._click(_link("Click Me"));
where popupWinName is the title of the popup window. In other words, the html for the popup window in this example would be something lie:
<html>
<head>
<title>popupWinName<title>
</head>
...
</html>