Selecting an item - selector issue

I am rather new to UIPath and having an issue with selecting items from a list with a “Click activity”

Schermafbeelding 2020-10-25 om 21.02.48

I initially selected the 1ste Ellen Stymans from the list and modified my Fuzzy Selecter as follows:

image

Where fullName is de full name is set toe “Ellen Vekeman”.

With the targeting methods set to both FuzzySelector and Image is always finds and selects the “Ellen Stymans” item.

With only FuzzySelector set the activity gives the following error:
image

How can I make that I can select the right entry from this list.

Here’s the HTML code of the list:
image

And a screenshot of the “Click Activity” properties

Any tips/help is much appreciated.

Hello @Hedwig_Van_Damme,

Did you tried Select Item Activity? Might resolve your issue.
image

Vasile.

1 Like

Hi Vasile,

Actually I did. But that gives: “The indicated target is not a valid UI element for the SelectItem action”.

On the same page there is a real dropdown and that works perfectly.
It’s not a dropdown box I think. When you type something in the field it presents the names that match what one types. But typing the entire name doesn’t help either than de ‘list’ of suggested names is empty.

I also took a look at the “Find children” activity but I can’t seem to set the correct selector for that.

Hi @Hedwig_Van_Damme
The detailed information about the issue is much appreciated.
However, it is still difficult to comment on exactly what needs to change. But just from looking at the current data, I’d say make the attribute ‘aaname’ more flexible.
Right now, it’s looking for a drop-down item with aaname value '' i.e. Blank value. This will never be the case because the aaname is usually always the actual text present in the item.
Can you try making it either wildcard match ( * ) or omit it completely or use the variable for aaname instead of check:text (either-or).

Hi @RPAForEveryone

I changed the fuzzySelector to:

  • "<webctrl type='' parentid='ui-id-1' tag='LI' aaname='{{fullName}}' />"
    Selects a wrong value

  • "<webctrl type='' parentid='ui-id-1' tag='LI' aaname='{{fullName}}' check:text='{{fullName}}' />"
    Hangs and gives error: "could not find the user-interface (ui) element for this action

  • "<webctrl type='' parentid='ui-id-1' tag='LI' check:text='{{fullName}}' />"
    Hangs and same error as above

  • and above combinations with type=‘*’

unfortunately no satisfying result.

Could it be that it has to do with the fact that de LI -tag as an A-tag which is split in 2 SPAN-tags? It is that level that contains the values (first name/last name)

Have you tried inspecting the components through UiExplorer?
The explorer window will show you several other properties which may actually help you pinpoint the right value each time.

Hi @RPAForEveryone,

Using the UIExplorer I managed to select the correct item in the list by using the selector and not the FuzzySelector. Using innertext and a delay before on the activity.

When I change the value of fullName it selects the correct item in the list however only possible for the hard-coded page.

If I copy the second line from the selector to the fuzzyselector it gives an error “could not find the user-interface (UI)…”

So one step closer - I hope :wink:

Hedwig

@Hedwig_Van_Damme
That’s easy. Just update your title to only contain common/constant text and replace everything else with an asterisk ( * ) sign, such as ‘Website - Google Chrome’
Essentially what you’re looking at is a selector like this:
<HTML app='chrome.exe' title='*- Google Chrome' />

If you’re making sure to use only one browser window, you can even match title with just asterisk 'title='*' but that’s probably overdoing it. It’s always recommended to match selector with some part of the title that you can uniquely detect (such as website name)
What I find strange here is that the title is probably too long to show the website name at the end. The title tends to get truncated after a certain character count.
See what works in your situation and ask here if any issues persist. :slight_smile:

Good luck!

Hi @RPAForEveryone

For the title I would use ‘Kennishoekpagina*’ since all pages to update start with this word.
But I can’t modify the first selector line - see screenshot in previous post it has a grey background → I can’s select or change it.

And when I put it in the fuzzyselector - it times out with the message no UI element found…
image

Hedwig

The top row of selector is frozen(not editable) when an activity is inside attach browser/attach window scope.
The top row applies to all activities within the sequence inside the attachment scope, hence it can’t be edited from the activity.
Modify the browser scope to match your desirable selector.

Hello @RPAForEveryone,

Thank you very very much. It works!
I wouldn’t have found this without your help. Thanks.

Selector:

<html app='chrome.exe' title='Kennishoekpagina*' />
<webctrl innertext='{{fullName}}' parentid='ui-id-1' tag='LI' />

Hedwig

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.