Forum Discussion

4m4d3u5's avatar
4m4d3u5
Contributor
6 years ago

Find methond

I am tring to use the find method to click on an object. My alias mapping is: Aliases.displayQt.UpgradeDialog.QtObject("QWidget", "", 2).QtObject("LocalNav::CenterButton", "", 1).QtObject("reject_button")

 

QtObject("reject_button") has a property of Name and a value of  QtObject("reject_button")

 

I am trying to do something like: 

Sys.Process("displayQt").find('Name','QtObject("reject_button")').click 

 

However, this is not working and it's saying that the object doesn't exsist. How do I use this function?

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Quite honestly, I would not use the "Name" property to find the object.  I'd use combination of "ObjectType" and "ObjectIdentifier" or perhaps other sets of properties.  The "Name" property is a construct of TestComplete's object tree.

    • TanyaYatskovska's avatar
      TanyaYatskovska
      SmartBear Alumni (Retired)

      Hi 4m4d3u5,

      It's great to hear that the issue was resolved! Could you please post the cause you've found? I think it may be helpful for someone in the future.