Need to get text from an element on screen with a changing index

For my bot, I need to extract a name from a certain position on screen. The name reads in at different indexes, but it will consistently be under a label on screen called “physician.” Is there a way to grab the location of the word physician, then either read text at the position of “physician” with a subtraction to the y axis to grab the separate element or get information from the element under physician using subtraction?

@arichmond1,

Use anchor to indicate `physician’ for the get text activity indicating a name.

Index or idx is never a reliable attribute.

1 Like

@arichmond1

if it is on screen then you can use get text with anchor base ..anchor as physician and the actual work as the element

cheers

1 Like

You shouldn’t be using idx at all. You should be building a selector that is unique without the need for the idx property. Open UI Explorer, indicate the element, and post a screenshot of the available properties on the right, and the selector it gives you.