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.
With ASP.NET & HTTPS sahi cannot close second IE browser window
Since Sahi does not record browser functions (an option to do this would be nice!) document.close() is not recorded. In order to work around this I wish to add <browser> code, JavaScript code, or Sahi code to close the browser window. I have tried various solutions but can only close my original IE browser window. It seems to be an issue of selection and focus. Has anyone done this?
Thanks,
Robin
Thanks,
Robin
Comments
Note that document.close will close the writer to the document object. It will not close the window.
Thanks but neither of these work. The IE browser window is launched with:
w = window.open(sURL, "", ...
so there is no name or ID for the _popup command.
"_call(window.close())" and "_call(window.top.close())" both close the launching window, NOT the top window that I want. I can't change the HTML so I cannot add a name.
Any other suggestions? This case should really be documented somewhere. I looked at the demo scripts but can't find my situation.
RR
If there are two separate instances of IE ( I'm talking first you navigate to the website base URL and then that document launches a SEPARATE instance of IE) how does Sahi know which instance is which, especially when the second instance has "" or null for its identifier? This seems to be the issue. The more succesful code I try simply closes the base URL window and leaves the second one floating there. The URLs are different. Is there a way to use browser code from the DOM to ID the correct window? Any more ideas?
RR
Using IE Inspector I found a long Title I could use ( "OncuEMR- ... ").
_popup("<title>").close(); did the trick!
Thanks!
RR
(Unfortunately I still need your help to figure out what is going on in my
"Value rather than Name" problem.) See this forum.