
Hi,
I am trying to populate a text field in a Java based windows application, but the UI element being detected is a previous one.
How do i customize the selector to pick the correct one using the Text Editor?
As shown in the screenshots, i need to populate the Text field next to Card# but the bot is trying to populate the Text field next to DOB(Refer to screenshot - JavaApplicationImage).
The Text Selector is as below
> frame[Name*=" System (Ver"] > dialog[Name^="Member"] > root_pane > layered_pane > panel > panel > panel > panel > scroll_pane > viewport > panel > panel > panel > text
Can we use the Index Value in the selector?, If yes, how to edit the Text editor to include the index value of the UI element?
The correct way to pass an index value to an element is by adding :eq(%Index%) at the end of the specific element you want indexed. Or :eq(1) if you want it passed literally, instead of using a variable. The question here, though, is which part of your selector should have that index, as it is not really clear from the screenshots you provided. You might want to try to capture both fields as separate selectors and compare them. Or experiment by adding the index to various parts of the selector, starting at the very end with text:eq(1), but this would be very tedious.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.