Forum Discussion

kevingiles's avatar
kevingiles
Occasional Contributor
4 years ago
Solved

Dynamic Object Recognition and how to use FindChild in Keyword test

Hello, everybody. I am currently assessing TestComplete as a replacement for another Automated test tool which is becoming more and more cumbersome.  I have only a short time to complete my assessme...
  • kevingiles's avatar
    kevingiles
    4 years ago

    Hey - I have found a solution that I worked out with a suggestion from another Forum member.

    Sub ClickPopup(Category,ItemName )
      Dim MyDiagram
      Set MyDiagram= Aliases.ClientHost.HwndSource_ProcessEditor.ProcessEditor.tabControl.myDiagram
      Call MyDiagram.ClickR(223, 369) ' Will make this a parameter eventually
      Call MyDiagram.PopupMenu.Click("New|" + Category)
      Dim FoundEntry
      Set FoundEntry = NameMapping.Sys.ClientHost.FindChild("text",ItemName,100) ' ClientHost is the application main window
      FoundEntry.Click()


    End Sub

     

    Thanks for the hints and help from rushikesh.