Forum Discussion

snie1's avatar
snie1
Contributor
10 years ago

Execution will be paused once a Delphi window pops up when using TC/TE

Hi There,

 

Our team met an issue with handling a Delphi window, once the window popup, the execution will be paused there and won't continue the next scripts any more until the window was closed manually. Anyone ever met this problem before? If yes could you please tell how to resolve it? I am wondering if there is any options in TestComplete to handle this kind of window which was just ignored by me.

 

Well, some details below:

TestComplete and TestExecute Version: 9.31 ( I have checked in v10. and v11., still works the same)

Our Application be tested: Desktop application developed by C#

The window caused execution paused: developed by Delphi

Namemapping: can map the window and get the properties/methods well by manually, but seems TestCompelte can't handle it well just during the execution.

 

This issue made us very confused and it blocks our testing, much appreciate if you could help, thanks.

 

Thanks again,

snie

 

15 Replies

  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor

    Sounds to me like it's waiting for the application to respond. If you leave it for about 15 minutes does it eventually time out?

    Also what line of code is it pausing at?

    If you are performing a search on a form it could be timing out for every single object on that form (which would be a really long time).

    • snie1's avatar
      snie1
      Contributor

      Thank you Ryan.

       

      It paused on any line which was trying to get any objects after the window popup.

       

      Close our Main form, this window will popup. then:

       

      1. If the next script does nothing to do with any objects, it can be execute smoothly, for example:

          Delay()

          shell command line

       

      2. But once you do anything related to objects, it will stop there and nothing happens then, I have tried to leave it there and check it the next day, nothing changed still be paued.

          After the window popup, it will stop in the next line which contains any "Aliase.MyExe...."

       

       

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    hi,

     

    after having mapped the window and the button that closes it, couldn't you use a "WaitAliasChild" function (that you have in SmartBear's samples) ?

     

    WaitAliasChildFunction(Alias, Object, Timeout in ms);

     

    for example, your window is mapped as following :

    Aliases.MyExe.MyWindow

     

    you should call the method like this :

     

    if (WaitAliasChildFunction(Aliases.MyExe, 'MyWindow', 20000)) then

       Aliases.MyExe.MyWindow.BtnClose.Click();

     

     

    it will waits for 20 seconds the window, if it appears within this time it will closes it by the BtnClose button.

    • snie1's avatar
      snie1
      Contributor

      Thanks.

       

      The message shown like "Waiting for Window: WndClass - "#32770", WndCaption - "xxxxx"".

      But actually the window is there already, I have tried using alias and full name too, no help.

       

      Even if it can't handle this window, or can't find this object, just look it as an overlapping window or unexpected window, at least allow me doing the next things. The problem is it stopped there any hold the whole execution. :(

       

      I have tried to give it a whole night to wait, nothing changed the next morning.

  • one more detail the add:

     

    Once this window popup, TestComplete paused there and showing me "Waiting for window: WndClass - "#32770", WndCaption - "xxxxx"", at this time I even couldn't click Stop button to make it stopped, the only thing to make TC recover is to close the window.

     

    Looks like the window is the perfect enemy of TestComplete.

  • NisHera's avatar
    NisHera
    Valued Contributor

    have you checked "Tools\Option\Engine\NameMapping\Updatename..." check box?

    try un-checking it and run........