I am searching number (226342) like so:
Which yields multiple results like so:
The one I want to select the option that states the matching # in YELLOW like so “WO#226342”
There will always be two numbers, and the one to select is the FIRST one like so:
I will be passing multiple numbers through the search, and the results will change but the one I need to select will always have text that states:
variable I entered)”
What is the best way to get UiPath to click the correct WO? Thanks in advance!!
I think you can use ‘click text’ and handle the selector.(ex: aaname=WO#*)
And set the text like “WO#”+[your variable].
working with dynamic selectors is nowadays more comfortable:
This tutorial will teach you how to easily use variables in your selectors. In other words, we will be making dynamic selectors without the use of the old method of concatenating strings. How cool is that!
For the purpose of this tutorial, I will make 1 click in the Notepad app.
Feel free to also reference our documentation here.
1. First, we will indicate the element we want to click on. In this case, it will be File menu in Notepad:
This results in the…
Another strategy could be also to check if the yellow box can be incorporated into the selector via class / style information
if its becomes more tricky:
the next helping ressort could be
I tried this. It was able to select an option that was a WO but was not consistent with selecting the one with the correct number (my variable)
So I followed your advice and here is what happened. The first item that was searched, the CORRECT selector was found. The second time, this happened:
And the WRONG WO# was selected… what is going wrong here?
Here is the exception:
RemoteException wrapping UiPath.Core.Activities.TextNotFoundException: Text was not found
at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance,
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor,
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
but you know your excact wo number you want to click, right?
I also tried to assign to a variable. The original variable I am working with is ‘WOnumber’. I used the assign activity to convert to string and use as WOidentifier.
I was unable to validate the expression.
Yes, and it is pulling the correct WO# to the variable ‘WOnumber’ in the side panel when I am debugging.
But after }} there is still text? So you can do }}*
can you share all fragments here as text.
the entire aaname
the selector formated with
WOnumber (GenericValue) = 221843
WOidentifier (string) = 221843
have a look on your post. Selector is empty due it was not surrounded with the preformat button orr it faild
I had a closer look to your case you need a different strategy as you are triggered by the yellow mark not by the text.
can you show for blue one and a yellow one the offered selctor tags (right side in UiExplorer)
Here is an example of the Ui Selector for
BLUE (WHICH IS NOT WHAT WE WANT TO SELECT):
I am not having any issues with the bot selecting the blue tckt. The problem I have is there are multiple search results in yellow and I cannot get the bot to consistently select the correct one that matches my variable (WOnumber/ WOidentifier)
OK now please do the Same for the yellow and blue Boxers inside the link. WE want find Out what WE can use color Trigger and looking e.g. class Name parts
What do you mean by inside the link?
I am intersted want to know if inside other html elements are existent. and if some markers can be found to know when it is blue when it is yellow
also an inspect element in browser and a screenshot from the structure could help. I do feel we are close to the idea of solution approach
please show me all from beginning a tag till closing a tag. I cannot inspect if information is ommited. Thanks
Some sensitive information I had to black out. Is this the entire tag you need?
Perfect. let inspect a few mins
can you try following:
replace in your selector the last line related to the button with:
<webctrl tag='A' class='*btn-warning*' idx='1'>
validate it and highlight it.
then in a seconde test set the idx to 2 and validate, highlight and check if the second yellow button is highlighted and is correct