Forum Discussion

benson's avatar
benson
Occasional Contributor
10 years ago

TreeView ClickItem simulation didn't work

TreeView clickItem didn't work. 

Below is my code

Error: The Treeview node not found

 

Sys.Process("Spirae.WaveClient").WinFormsObject("WaveClient").WinFormsObject("DesignerControl").WinFormsObject("splitContainer1").WinFormsObject("SplitterPanel", "", 2).WinFormsObject("SystemView").WinFormsObject("splitContainerSystemView").WinFormsObject("SplitterPanel", "", 2).WinFormsObject("splitContainerDetails").WinFormsObject("SplitterPanel", "", 2).WinFormsObject("AssetTray").WinFormsObject("AssetTrayListView").ClickItem("|[1]")

19 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    record a simple test clicking your tree item and compare what you wrote and what the testcomplete recorded

    what are the differences?

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    have you mapped your treeview ?

    then, either you use the index of your treeview node

     

    treeviewmappedname.clickitem(3); (for example)

     

    or you use the text value of the node

     

    treeviewmappedname.clickitem("|node 1|node 2| etc etc");

    • benson's avatar
      benson
      Occasional Contributor

      I think your referring to Object Mapping. I had done object mapping in the project properties.

      Thank You 

      • m_essaid's avatar
        m_essaid
        Valued Contributor

        Hi,

        ok you have done an object mapping but it seems that you don't handle the object via the mapping.

        am I wrong ?