Ask a Question

How to uniquely identify button object as my button object its hierarchy is changing every time

shipra6
Occasional Contributor

How to uniquely identify button object as my button object its hierarchy is changing every time

 
5 REPLIES 5
Marsha_R
Champion Level 2

If the hierarchy is changing in some pattern, like a page name being page1000 then page1000a

you can use wildcards to match the pattern instead of the exact page name and then look for your object with FindChild or something similar

 

here's information about wildcards

https://support.smartbear.com/testcomplete/docs/reference/misc/using-wildcards.html

 

here's information about FindChild

https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/findch...

 

shipra6
Occasional Contributor

My case is desktop app

Marsha_R
Champion Level 2

Wildcards will still work. Can you show us examples of how the hierarchy is changing?

shipra6
Occasional Contributor

Ahh!

Actually I have some window objects under which few buttons are there and i need to click on one of the child buttons of that window. and the problem is suppose when i record obj1 points to combo button but after one day that hierarchy changes its position and next day obj1 is pointing to meals & deals.

 

This is the problem that index changes in hierarchy even though WndCaption and Other properties stay intact.

shipra6_0-1671469534920.png

 

 

Marsha_R
Champion Level 2

Try searching by WndCaption to find the object and then get the current index to use in further actions.

cancel
Showing results for 
Search instead for 
Did you mean: