Forum Discussion

ChrisPro's avatar
ChrisPro
Contributor
11 years ago

Search an object, but index of process change

I have several process with the same name because it is the same executable, but with different INDEX.

I search to click on a button with name "MY_BUTTON", but i don't know the index of process where the button is present. In fact, the index can be change at each execution.



What is the method to search a button with name "MY_BUTTON" and present in a process with name "MY_PROCESS" in JScript?



Thanks for your answer.
  • Hi Chris,

     


    Do the app windows that correspond to each process contain the same set of objects inside? If the window, which you need to click, has, say, a label that the other window doesn't have, you can map this label as a required child for this exact window. As a result, TestComplete will click the button only on the window that has this label. Please read the "Specifying Required Child Objects" article for more information.