Ask a Question

Handling Internet Explorer Pop Windows (Dialogs)

JoaoMLH
New Contributor

Handling Internet Explorer Pop Windows (Dialogs)



Hello,



I'm having problems handling pop-up windows with Internet Explorer (pop-up created using window.open)



I'm using Script Units to code my test cases.

Let me explain my test-scenario:

  - 1. Click on a Button on the Main-page

  - 2. A pop-up is opened (with a close button)

  - 3. Close the Pop-up via the Close Button



I use the TestComplete Recorder to record the steps 1, 2 and 3.

But when playing the recorded test code, it doesn't work, everything is closed.

The javascript onclick code for the Close-Button is "window.close()".

If I don't use Testcomplete and Click on the Close-Button, only the Pop-Up is closed.



Could you please help me out?

The Internetexplorer version is 7.0.5730.13

The Testcomplete version is 7.20.562.7

Do you need more info?



Best regards

Joao Henriques
3 REPLIES 3


Hello Joao,





I was unable to recreate this behavior with TestComplete 7.52 and the following sample pages.

<html><body>

<input type="button" value="Click Me" onclick="window.open('inner.html')" />

</body></html>


<html><body>

<input type="button" value="Close" onclick="window.close()" />

</body></html>






Please update TestComplete 7.52 and check whether you can reproduce the problem with these pages. If you can, please send me the code generated by TestComplete when you recorded a test.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
JoaoMLH
New Contributor

Hello David,



thank you for the fast reply.

With the code you sent me it works fine.

Testcomplete opens the popup and closes it afterwards.



I have now upgraded to the 7.52 version of Testcomplete, but the problem still occures.

I've also tried it with Firefox, and it also doesn't work

What files, can I sent you, in order for you to reproduce the problem?

This is the code that Testcomplete generates:



var  iexplore;

  iexplore = Aliases.iexplore;

 iexplore.pagePartsRapido1.formFrmmkf.tableMkfmodulecontrolerTblmaster.cell.panelMkfmodulecontrolerHeaderMkf.table.cell.table.cell.panelMkfmodulecontrolerHeaderHea.tableButtonpainelfirsttable.cell.tableButtonpainelsecondtable.cell.imageRapmsg.Click(15, 6);

  iexplore.pagePartsrapidoMessage.panelMkfmodulecontrolerContentvi.table.cell.buttonBtnclose.Click();



The first Click opens the popup. The second click is the click of the popup window.



Best regards,

Joao Henriques


Hello Joao,





Please reproduce the problem to generate a log of the failed execution, pack the entire project suite folder and send me the archive via the Contact Support form. I will look into this case.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: