Forum Discussion

shiva_ranabhat's avatar
shiva_ranabhat
Contributor
9 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

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Shiva,

     

    I don’t think that TestComplete considers this window as an unexpected one. Thus, the event wasn’t fired.

     

    I would suggest that you record your test over this window and check how TestComplete works with it:

    http://smartbear.com/viewarticle/70284/

    • 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.