Forum Discussion

hwang's avatar
hwang
Occasional Contributor
12 months ago

Object Spy not able to capture subforms and its controls inside of main form

I have a windows desktop application with a main form. From main form, I can open a sub form with a lot of controls such as test box, search button etc. When I tried to use object spy to get these controls name, the spy is only red out the main form and cannot capture (red frame) any controls in its sub form. The spy only red out the main form, and not able to red out the sub form and any of sub forms controls. How to fix this? Need help ASAP.

15 Replies

    • hwang's avatar
      hwang
      Occasional Contributor

      Yes, it does support. Someone else from my team can capture the controls from their machine. I use a VM machine remotely. Not sure if this is an issue? 

  • David45's avatar
    David45
    Occasional Visitor

    Hello, 
    I have some write this you can read this 

    It seems like you're facing an issue with object spy not capturing controls in a sub form of your Windows desktop application. This could be due to various reasons, and I'll provide some troubleshooting steps to help you resolve this:

     

    Enable Sub Form or Child Control Recognition: Sometimes, object spy tools might not automatically recognize controls within sub forms. Check if your object spy tool has an option to enable or focus on child controls within sub forms. This could be a setting within the tool itself.

    Check Object Recognition Mode: Object spy tools often have different modes for recognizing objects. Make sure you're using the appropriate recognition mode for your application. Some tools might have modes like "Window," "Control," or "Text," which can affect what is captured.

     

    object spy tools might behave differently based on the application, its controls, and the tool itself. It's a good practice to experiment with different settings and approaches to find the one that works best for your specific case.

     

    Thanks for read this. i hope my answer is good and helpful.

    • hwang's avatar
      hwang
      Occasional Contributor

      Not able to find Object Spy settings in tool-settings. where to take took at spy settings and change mode?

      thanks,

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    If you have TC on your local machine, and using Object Spy to identify desktop/web UI controls that's being hosted on a VM, it's not going to work. Same applies to having TC on a VM.

     

    Majority of all automation tools have this issues. 

    • hwang's avatar
      hwang
      Occasional Contributor

      TC and Application all are in VM. Object spy works for other application such as Notepad, WebBrowser in same VM,  only not work for my working application. 

      I am not sure if the VM is a real issue. 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Do not use VM.

     

    Have TestComplete and your application on your local machine, and Object Spy will work.

    • hwang's avatar
      hwang
      Occasional Contributor

      I have no choice for this. The company set it up by using VM for remote work. 

      thanks anyway.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I'm also remote working, but I have TestComplete installed on my local machine.

    • hwang's avatar
      hwang
      Occasional Contributor

      that is good for you. our applications for internal use only, not allowed to install to my local machine. Actually, vpn is a good option for remote work.

       

    • hwang's avatar
      hwang
      Occasional Contributor

      see David45 post above. He said that:

      "Object spy tools often have different modes for recognizing objects. Make sure you're using the appropriate recognition mode for your application. Some tools might have modes like "Window," "Control," or "Text," which can affect what is captured."

       

      I could not find out the spy settings and mode change. Do you know where?

       

  • jkrolczy's avatar
    jkrolczy
    Regular Contributor

    You could see if the main form has a ClassName and apply that into your MSAA area to see if ObjectSpy can then penetrate deeper.