Forum Discussion

avenedam's avatar
Occasional Contributor
14 years ago

Odd Behaviour with VB App testing

Hi again!

I'm noticing some odd behaviour when trying to map the objects in my VB 6 application.  I have a form that has 6 text boxes, when I click on one of the text box, a keyboard form is instantiated.  I then enter some text and click OK.  The form is then destroyed.  I then click the second text box and the keyboard form is created again.  This happens for the next 5 textboxes.

My problem is that the keyboard seems to be mapped to the object browser in a different way each time.  In some cases the keyboard appears in the object browser as VBObject["frmKeyboard"] and in some cases it appears as Form["Enter the Text"].

I haven't been able to pin down what causes this, although it seems the first click on the textbox works fine and it is the subsequent instances of the frmKeyboard that change on me.

This may have something to do with the fact that the form has all the same properties(caption, width, child objects, etc).

Has anyone experienced this issue, or know why this is happening?  I'd like to stablize this test before it goes into our regular test cycle.

Thanks in advance.

9 Replies

  • Hello,

    When the form has the VBObject("frmKeyboard") name, TestComplete recognizes the form as a VB object. When it is displayed as a Form("...") object, most probably, TestComplete recognizes the form as an MSAA object. 

    To make TestComplete recognize the form only as a VB object, please follow the steps below:

    1. Find the WndClass property of the form in the Object Browser.

    2. Open the MSAA setting of the current project (Tools | Current Project Properties | Open Applications | MSAA) and check whether the form's WndClass value meets any criteria in the list of accepted MSAA windows. If it does, uncheck the corresponding item. For example, this can be the "*" or "ThunderRT6FormDC" item if it is checked.

    3. Go to the Tools | Current Project Properties | Open Applications | General panel and make sure that the NativeVBObject item is higher than both the NativeMSAA and Unknown items.

    4. Remove the Form["Enter the Text"] node form the Mapped Objects tree.

    Please let us know whether this helps.
  • avenedam's avatar
    Occasional Contributor
    Hi again!

    Unfortunately, all that has changed is that it is now referring to the object as a window instead of a form.

    Still seeking a solution....

  • avenedam's avatar
    Occasional Contributor
    On another point, if i run our vb application outside of testcomplete, everything seems to show up as a vbobject.

  • Hello Audrey,

    Please perform the following steps:

    1. Add the aqUtils.Delay(5000) method call just after the script line that runs the tested application.

    2. Increase the  'Method invoke timeout' project option to 5000 or 10000 ms (Tools | Current Project Properties | Open Applications | General). 

    Does this help?
  • nikhilmv99's avatar
    Occasional Contributor
    HI David,

    I am currently facing quite similar issue. When I created the Test it recognised the form (thunderrt6formdc). Test was running well for last week but suddenly it started giving error saying frmToplevel object not found.

    I tried your steps of removing the checks and making NativeVBObject higher in current project properties. Also tried with adding delay

    But still it gives same error.

    Please advice what should be done to make the testcases run again.



  • Hello Nikhil,

    Which exactly version of TestComplete are you using? The latest version is 8.60, so please upgrade to it if possible.

    Also, run the Orders sample application (<TestComplete 8 Samples>\Open Applications\VB\Orders.exe) and see whether it is recognized as Open Application (the application's main form is exposed using the VBObject method) and let me know your results.

  • Hello

    I have installed Testcomplete v. 5 on Win 7.

    I set values, as you write, but I have still problem with this.

    In project I have reference VBObject("myForm") but under Win7 it is returned Windows(""ThunderRT6FormDC",...)

      function Form(FrmName)

    ' function return Form object, if find windows with name in parameters FrmNane



      do until SW.Split>=GlobalWaitTimeout

          set w=Sys.Desktop.ActiveWindow()  

          If w.Name=a  then

              Set Form=w

              SW. Stop()


              Exit function

          end if



      Log.Error("ERROR NOT FOUND WINDOW " + a) 

      end function

    On Win 7    w.Name returned Windows("ThunderRT6FormDC",...)

    On WinXP  w.Name returned VBObjec(FrmName)

    Can Somebody Help me


  • Hello Jan,

    Note that TestComplete 5 does not provide official support for Windows 7, so we cannot guarantee the correct work of this version under Windows 7. I recommend that you consider upgrading to the latest version of TestComplete.

    Currently, to solve the problem, try launching TestComplete as an administrator, as described in the Testing Applications With TestComplete Under Windows Vista and Later Operating Systems help topic of the TestComplete 8 help system.
  • dyoshida's avatar
    New Contributor
    I'm having the same problem.  We are upgrading from 8.70 to 9.20.   If I could get the patch for Test Complete and Test Execute, that would be swell.  I've put in a ticket already but haven't been assigned a case number yet, so the sooner I get the patch the better.   As always, I'm under a time crunch now and am about to abandon our upgrade.

    EDIT:  I accidently put this in the wrong thread, but there IS apparently a patch.