Forum Discussion

Largent803's avatar
Largent803
Contributor
3 years ago
Solved

Selecting child elements inside a textnode

I have a parent textnode which populates what looks like a menu option. What I need is to be able to at random select the one of

these elements. I have created a csv with the necessary information in it however, I do not know away to select the panel options which are select

when I select one of the menu options.

 

Here is an example of a element that is not the parent of the object. The parent is hidden to me.

 

textnode13

Then the following

Aliases.browser.pageXXXX.panel10

 

That is what the elements child name is that appears when I click on the item. Is there away to find out what the parent is of the panel options. Because the menu appears when the textnode is clicked. However, I can't find away to select any of the elements in the textnode menu options. Any ideas on which method to use in order to select the appropriate parent to the panels to add to the script.

  • Hi,

     

    The parent is hidden to me.

    This is just not possible. Use Object Browser or Object Spy to examine the structure of your tested application and figure-out what elements you need for your test code and how these elements can be found. Then either add them to the NameMapping or (if stable and reliable mapping is inconvenient or not possible) write a code to search for the required element during runtime.

     

    P.S. White TestComplete does its best to map elements during recording, this is not recommended for production use. The better approach is to examine the tested application before recording, map required elements so they are identified stably and uniquely and only then record your actions.

     

1 Reply

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    The parent is hidden to me.

    This is just not possible. Use Object Browser or Object Spy to examine the structure of your tested application and figure-out what elements you need for your test code and how these elements can be found. Then either add them to the NameMapping or (if stable and reliable mapping is inconvenient or not possible) write a code to search for the required element during runtime.

     

    P.S. White TestComplete does its best to map elements during recording, this is not recommended for production use. The better approach is to examine the tested application before recording, map required elements so they are identified stably and uniquely and only then record your actions.