Forum Discussion

tvlchkitout's avatar
tvlchkitout
New Contributor
6 years ago

Cannot get VCLObject on slave machine

I have my automated testing envioronment configured as below:

 

Master: Windows 7 Enterprise, TestComplete 11.31.2420.7(floating) and TestExecute 11.31.2420.11. Has access to license server and the automated test LAN.

Slave: Windows 7 Ultimate, TestExecute 11.31.2420.11. Has access to only automated test LAN.

 

My to be tested software is developed with Delphi 2007. I have two ".exe" to test, A.exe(Aliases.A) and B.exe(Aliases.B), in the same project. I use python scripts.

On my master machine, everything works fine for both instances of Aliases.A and B(using TestComplete or TestExecute). I can properly detect the objects with either namemapping or with .VCLObject() method.

 

Now my problem is, I set up a Network Suite and send a command to let my Slave to run a task, everything still works fine with Aliases.A. But not for Aliases.B. not with namemapping or VCLObject() method.  The process seems to only have generic windows properties. 

 

The project is copied to slave with network suite so I suppose all settings including TestedApps and Namemapping are same.

 

I cannot install TestComplete on my slave to try object spy since my slave has to be in a LAN without access to Testcomplete license server.

 

As an exmaple:

I have below two functions return the same object. both works on master machine but find_form_vcl() doesn't work on slave machine( tried initiated with network suite or run testexecute locally with command line), it returns object not found. As if TestExecute doesn't recognize it as a Delphi compiled.

def find_form_Wnd():
    b = Aliases.B
    props = ["WndCaption"]
    values = ["xxxForm"]
    form = b.FindChild(props, values, 5)
    return form


def find_form_vcl():
    b = Aliases.B
    form = b.VCLObject("xxxForm")
    return form

 

I already made sure all instances are run with the same Windows user.

 

 

------Update on Nov.15----------

I managed to install Test Complete 11.30 on my slave machine and check the problematic process B.exe in object browser.(Using the same project copied from master).

I made a debug build with the debug info of B.exe. In the object browser it is not recognized by Test Complete as an Open applications as the other processes of my program.  I am trying to figure out if there is any other variants between master and slave machine.(One thing I is the master machine has a project suite with all other projects but the slave machine only has the project for that specific application. wondering if any settings in project suite can affect that.)

 

5 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    On the slave machine, run TestExecute and then right-click on the icon in your systray.  Click "Install Extensions" and check to make sure the Delphi support extension is active on that machine.

     

    Another possiblity could be a timing problem.  The object MAY be there, but calling just b.VCLObject('xxxForm') does not actually do any waiting... it may take some time for the object to be recognized.  Try using the WaitVCLObject method instead and see if that improves things.

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      One more possibility, considering that


      for Aliases.B. [...] The process seems to only have generic windows properties.


       is that the file with the debug information for the B application (B.pdb) is not deployed (copied) to the slave machine or TestExecute cannot find it there.

       

      • tvlchkitout's avatar
        tvlchkitout
        New Contributor

        Thanks for the help.

        Yes I put the debug info file(.tds for Delphi) with the .exe on the slave machine. I also made a debug build with debug info and TC is still not able to recognize it as a Delphi built process.

    • tvlchkitout's avatar
      tvlchkitout
      New Contributor

      Thanks for the suggestions.

       

       I checked my TC's extenstions and clicked select all then OK. Unfortunately the problem remains.

      Tried using the WaitVCLObject method with 10 seconds it still has the same problem. I can manualy click the window but TC is not able to detect it even it's there Visible.