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.
How do I get Sahi to recognize popup window?
I am scripting a simple test that involves a popup - I cannot get Sahi to recognize the popup at all. I would really appreciate any help at all on this as I like the tool but I am struggling with it when a popup/new window is launched. Please anyone with some Sahi knowledge, let me know where I am going wrong!
Example script:
I enter the Apple stock code in the site fidelity.com and a popup is displayed with the stock info. I have tried both window name and window title as the popup identifier, and I have tried wildcards. Nothing seems to identify it.
Example script:
_navigateTo("http://www.fidelity.com"
;
_setValue(_textbox("SID_VALUE_ID"), "AAPL");
_click(_submit("Quotes"));
//The next part fails (I have tried many different identifiers passed into _popup)
_popup("Get Quote for AAPL: Fidelity Investments - Google Chrome")._click(_link("3m"));
//I also tried using _selectWindow to set popup as context for actions but can't get this to work
Example script:
I enter the Apple stock code in the site fidelity.com and a popup is displayed with the stock info. I have tried both window name and window title as the popup identifier, and I have tried wildcards. Nothing seems to identify it.
Example script:
_navigateTo("http://www.fidelity.com"
_setValue(_textbox("SID_VALUE_ID"), "AAPL");
_click(_submit("Quotes"));
//The next part fails (I have tried many different identifiers passed into _popup)
_popup("Get Quote for AAPL: Fidelity Investments - Google Chrome")._click(_link("3m"));
//I also tried using _selectWindow to set popup as context for actions but can't get this to work
Best Answer
-
_popup("Get Quote for AAPL: Fidelity Investments - Google Chrome")._click(_link("3m"));
has Google Chrome in it!
It should just be
_popup("Get Quote for AAPL: Fidelity Investments")._click(_link("3m"));
This script was tested and works:
_navigateTo('http://www.fidelity.com'); _setValue(_textbox("SID_VALUE_ID"), "AAPL"); _click(_submit("Quotes")); _popup("Get Quote for AAPL: Fidelity Investments")._click(_link("3m"));
Answers
Please take a look at the below link
http://sahi.co.in/w/_lastalert
Hope this may help you.. Good Luck !!
Appreciate your response though.
Yes, The above script working fine.
Thanks much for your information.
Thanks,
Umashankar
Thanks guys - I can now identify popup.