Dynamic Selectors and no apparent anchor. What can I do?

I have this screen here.

As far as I can tell, all the checkboxes and textboxes are dynamic.

I need to type text into the textbox where it’s written “Manual 8S” and the other where it’s written “001”

I tried using Anchor, and using the leftmost textboxes (Nome and Versão) as anchors for clicking the rightmost textboxes. But it did not work. The selectors of those leftmost textboxes completely change all the time.

I also tried using anchor with the two “folder” images, but it also did not work. And tried to anchor both textboxes to “Item” and “Valor”, which are fixed values on the screen, but it also did not work.

I thought of using FIND RELATIVE ELEMENT and CONTEXT AWARE ANCHOR… but the documentation on both is very sparse and incomplete imho.

For example, Context Aware Anchor gives you two areas to add “activies”: ANCHOR and ACTION.
But the documentation (and properties) say that at INPUT should insert Anchor and Target bounding boxes, and that can be done with “These coordinates can be automatically retrieved by using the Indicate on screen functionality accessible from the body of the activity.”

However, that is not true. You can only get “indicate from screen” IF you add an activity like FIND ELEMENT. But then the FIND ELEMENT coordinates will be copied ONLY to the ANCHOR, not to the TARGET bounding box!!


I also tried using FIND RELATIVE ELEMENT… but it also requires you to select an INPUT and an OUTPUT, with the output needind to be a “RelativeElement (UiElement” that must be filled as a textbox (no way to select it on the screen)

Any ideas if maybe Find Relative Element or Context Aware Anchor might help me here or there are other better methods?

ps: the documentation is also not very clear on how do I perform an action (like type into or click) after Finding a Relative Element.

I was able to solve the issue temporarily in the WORST way possible, as it will certainly bug as soon as I try to use the bot on another screen.

Basically, I used a “click image” activity, and used as image an area of the screen showing those small icons on the topright and as bottom left, the middle of the text field, then told the activity to use as Cursor Position the bottom left.

It works, but as soon as the aspect ratio changes, the relative positions of icons and text field might change, bugging my less than ideal solution.

So, I still need help solving this problem, with a good Robotic solution instead of my Frankenstein Monster solution.

1 Like

What selectors do you get when using write-text-activity?
Will the screen look always the same? ( Is it possible to use key(board)-comnands?)

a) “What selectors do you get when using write-text-activity?”

sorry, do you mean the type-into activity? I see no “Write-Text” activity here. There is one called “write line”, but it has no selectors.

if I use “type into” and select a textbox I get webctrl id=‘e3KQt7’ tag='INPUT

b) The screen will always look the same.
c) Nope. No keyboard commands work on this system

Yes of cause :sunglasses:
Your selectors are not displayed. There are selectors?
You can’t jump from field to field using tabulator?

Sorry. I had posted the selector, but they come with a code wrapped around them and the Forum engine makes the selector invisible if you post with this code around, as it shows on UiPath.

I deleted the code marks and now it’s showing on the previous post, but here it is again: webctrl id=‘e3KQt7’ tag='INPUT

I will try it again tomorrow, but as far as I can see, tabulator doesn´t work with this program. You press TAB and you cycle only throw the URL box and some other browser buttons, but not through the elements INSIDE the browser, while using this particular software.

the text boxes on the left always display NOME (in the middle left) and VERSÃO (on the bottom left).

can´t UiPath find those TEXTS inside the boxes, and then tell to TYPE INTO 300 pixels to the right?

You can try anchor- based.
Did you use the UI Explorer? Maybe you can use other css-based selectors.

1 - I made some tests. If I use TAB, I can´t reach any of the editable fields. But if I click in one editable field, than TAB will scroll through out the rest of the editable fields, until it again selects a browser element (like URL bar), and then you cannot TAB your way back to the editable fields (unless you select again an editable field, with the mouse)

2 - “You can try anchor- based.”
Yes, but as the thread title says, I found no apparent anchors. All anchors I tried did not work.

As for the UI Explorer, I am not very sure how I can find other CSS based selectors. What are other CSS based selectors?

Yes these are css-selectors.
I think, id and parentid are dynamic, so you can’t use them, but maybe the extention “real” and “frame” keep the same - so you could use “*real” and “*frame” - if necessary.
I think, you will have to try out , which (combination of) selectors are usable - which stay always the same or are predictable and explicit enough for use.
Sorry, more is unfortunately not possible from the distance…

but won´t some of those extentions be used for SEVERAL different elements on the screen??

If I use as anchor *-real, how will UiPath know which *-real element it is linking to?

[quote=“Rogerio_Penna, post:11, topic:104975, full:true”]
but won´t some of those extentions be used for SEVERAL different elements on the screen??

Probably yes, but in combination with other selectors maybe unique (colname, rowname)

I doubt this will work, I would try Itemfield “nome” als anchor and “versao”

I just tried a test… and it SEEMS that the checkmarks on the very left, are stable Selectors to use as anchors.

But then, I guess I am missing something about Anchors.

I used those checkmarks as Anchors.

And then as activity of the Anchor Base Activity, I used “Type Into” and selected the text boxes.

Now… when I run the flow, Uipath is trying to insert the text at the at the Textboxes right next to the Anchor Checkboxes. (the greyed text boxes, where you can´t actually type text)