Forum Discussion

shiva_ranabhat's avatar
shiva_ranabhat
Contributor
10 years ago

Saving and verifying export

Hi,

 

I am trying to 'Save' an export from IE. 

 

In Script unit name- Export_user,

 

1. Clicks on Export button. 

2. A new window pops up. Then I have the following function:

 

function ExportEvent_OnUnexpectedWindow(Sender, Window, LogParams)
{
LogParams.Locked = true;
Log.Error("SR Unexpected window");
Window.Close();
}

 

But TestComplete finishes after running first function. How can we call the second function when a new windows pops up?

CorrectMe: 

ExportEvent_OnUnexpectedWindow(ExportEvent, Sys.browser.dlgViewDownloadsInternetExplorer, "x");

 

 

Should this not post an Error message 'SR Unexpected window' in my log?

 

Thanks in advance,

Shiva

 

2 Replies

    • shiva_ranabhat's avatar
      shiva_ranabhat
      Contributor

      Thanks Tanya, 

       

      Yep it considered pop-up window as Frame Notification Bar.

      I will have to hardcode the co-ordinates because object spy couldn't hover over open button.