The documentation About Selectors does not include any references to the Nav Tags (e.g. <nav up=‘3’ />).
Where can I find the documentation? If there is none, can you explain and show the available syntax for the entire assortment of Nav tags?
The documentation About Selectors does not include any references to the Nav Tags (e.g. <nav up=‘3’ />).
Where can I find the documentation? If there is none, can you explain and show the available syntax for the entire assortment of Nav tags?
Hello @grosner!
It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.
First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.
You can check out some of our resources directly, see below:
Always search first. It is the best way to quickly find your answer. Check out the icon for that.
Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.
Topic that contains most common solutions with example project files can be found here.
Read our official documentation where you can find a lot of information and instructions about each of our products:
Watch the videos on our official YouTube channel for more visual tutorials.
Meet us and our users on our Community Slack and ask your question there.
Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.
Thank you for helping us build our UiPath Community!
Cheers from your friendly
Forum_Staff
I’m also looking for the official documentation as there are a lot of cases where anchors doesn’t work as expected for me but could not find it,
I’ve found the following file
UiPath_Automation_Best_Practice_Guide.pdf (9.6 MB) which includes a brief explanation on page 27.
(original link to the file here)
Still those tags are also not working as expected in 2023.10.0.
I have
<div id='a'>
<span id='b'>
<span id='c'>
<span id='d'>some text</span>
and the selector
<webctrl tag='DIV'/>
<webctrl tag='SPAN'/>
<webctrl tag='SPAN' innertext='*some text*' />
<nav up='2'/>
<webctrl idx='1'/>
is returning the the span ‘b’ instead of the div.
I’m pretty sure I’ve the hierarchy right because the following js works as expected in returning the div
[...document.querySelectorAll("div span span")].filter( x=>x.innerText=='some text')[0].parentElement.parentElement
That’s an excellent document. Thank you for posting it.
I think the idx=‘1’ is the issue. If you want the DIV it seems like all you want is “up 2” not the first child of “up 2.”
That’s what i thought, but when I’ve tried it i get “Invalid indexes order in Subselector”
Through trial and error i’ve noticed including an element tag after nav works, but it does get the first children of the parent.
I guess ending the selector at the tag is still correct but something else is wrong, likely a bug.
A search for “Invalid indexes order in Subselector” doesn’t return me anything (google or the forums)
I can’t get the nav to do anything. The doc appears a bit old, I wonder if it has been deprecated. When I add the nav property it won’t validate and I can’t even click Confirm.
Yes reasonable as with <webctrl idx='1' />
a step down is defined
Similar to:
[0].parentElement.parentElement
find Element / check app state check element output: myUiElement
with a selector of:
<webctrl tag='DIV'/>
<webctrl tag='SPAN'/>
<webctrl tag='SPAN' innertext='*some text*' />
myDiv = myUiElement.Parent.Parent
Here it works as long <nav>
is not the last tag (which means you have to do extra steps, which is definitely confusing).
Instead of
<webctrl tag='DIV'/>
<webctrl tag='SPAN'/>
<webctrl tag='SPAN' innertext='*some text*' />
<nav up='2'/>
I would need to do something like
<webctrl tag='DIV'/>
<webctrl tag='SPAN'/>
<webctrl tag='SPAN' innertext='*some text*' />
<nav up='3'/>
<webctrl id='a'/>
(I’ve added id’s to the example just to make it easier to talk about the elements. Imagine i would have to add another more complex criteria to the last <webctrl>
)
That works but is way less elegant, understandable and mantainable. It would be way better to use only a selector with all it’s the benefits (ObjRepository, etc).
Additionally we don’t really have much control over the Anchors and the internal steps so i’ve found many cases where the anchor simply won’t work.
Here’s the real life scenario:
Setting the target and anchor. Notice how the target have a non-dynamic aaname selector.,
But after making the target’s aaname dynamic…
As far as i know we currently have no way of explicity telling studio the element tree relationship’s without the <nav>
tag.
we would recommend that you will open a new topic, when further support is needed.
yes, but it showcase that your selector construct and the
are different things
When opening your own topic, then please share also with us the more parent surroundings from
with us. Thanks
It’s still on topic with the original, unaswered post that other people might stumble upon just as i did.
I know, i was just experimenting on how the <nav>
works since studio doesn’t let me end a selector with it and there’s no mention on that on any (current) official documentation.
I edited my last post with screenshots on the problem of using anchors.
Here’s the relavant HTML
<div data-uipath_custom_id_23_10_69_1489="9">
<span data-uipath_custom_id_23_10_69_1489="17">
<span data-uipath_custom_id_23_10_69_1489="2">Nota Cancelada</span>
</span>
<span data-uipath_custom_id_23_10_69_1489="4">
<span data-uipath_custom_id_23_10_69_1489="5">Data Cancelamento:</span>
</span>
<span data-uipath_custom_id_23_10_69_1489="3">
<span data-uipath_custom_id_23_10_69_1489="140">25/10/2023 17:18:00</span>
</span>
</div>