I click on a link on a webpage in my application and a new window pops up (I'm using Internet Explorer 11, and not permitted to use any other browser).
The window is opened as an html page from the code: href=fileName.html.
However, none of the Robot framework Selenium2Library keywords will close the popped up window, such as Close Window, which according to the documentation, says, "Closes the currently open pop-up window". However, this command closes the main browser window and NOT the one that popped up.
I also tried using the variants of the Get Window command such as Get Window Titles or Get Window Identifiers, but it returned either the main browser window or no windows.
Is there a way to close popped up window?
Thanks
EDIT:
Here is the html link for the window:
<a title="Birth Proof Code More Information" id="uef-help0" href="birthProofHelp.html" target="_blank" rel="help" data-uefid="uef-li-hlp" data-modal-disable="true">More Info</a>
Here is the source code for the window:
!DOCTYPE HTML>
<html>
<head>
<title>Birth Proof</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
A - ALLEGED<br>
B - BIRTH/BAPTISMAL CERTIFICATE (BEFORE THE AGE OF 5) / PREFERRED BIRTH PROOF<br>
C - DEFINITION OF 'CONVINCING EVIDENCE' MET<br>
F - PREVIOUSLY ESTABLISHED BY THE SSA<br>
Q - ESTABLISHED BASED ON EVIDENCE OTHER THAN THAT COVERED UNDER CODES 'B' AND 'C'<br>
</body>
</html>
I tried sleeping 60 seconds for the window to appear, and it still didn't work.
The window is really appearing. Like I said, Close Window closes the main browser window and NOT the one that popped up.
According to Robot documentation, Get Window Titles does this:
Returns the titles of ALL windows known to the current browser instance.
href=fileName.htmlby itself won't cause a new window to open up. Can you show the exact definition of the window. When you've triedclose window, did you wait for a moment to get the window a chance to appear? Are you certain the window is appearing? ifGet window titlesandget window identifiersreturns only the main window, it seems like this popup window isn't appearing. - Bryan Oakley