Drop Down Select Item on Basis of the HTML Value

I want to do select item on the basis of HTML value option…

Can any one please help me out with this out :slight_smile:

image

Now I can select the value i.e. aaname directly in the select item by passing in the variable. But I am getting the value option… Can anyone let me know if that is doable ?

Thanks in advance :slight_smile:

I got you fam one sec

@Shubham_Varshney
interesting!! I think they may have updated the select item activity. I tried it out and it auto-populated the available values. Can you see if this would work for you?

Main.xaml (8.1 KB)

Update- this workflow shows how it would work with a variable.
selectItemWithVariable.xaml (8.4 KB)
Here are my package versions for this
image

@Shubham_Varshney
I CAN Help you as e.g i had prewritten a tutorial on this doing it with find children

So User find xhildren Filter over the selects and User value Attribute für calculation. I encountered that value is same to Text if value is not set

@ppr I tried the find children activity, the whole task take 11 seconds and the drop down will always remain the same so I am kinda confused if I need to do that before performing the task.
They are unique in value and aaname. But I am not looking for creating a library for the task :frowning:
I want to pass this out if possible in the select item activity by passing the html code.

hi @Mr_Meeseeks

You are correct, but it’s populating with aaname… I am trying to select the value from the html tag…

@Shubham_Varshney this post explains how to select by value

but it is depreciated (need IPlaceHolderResolver)

So I made a new one. Let me know if it works for you. It worked for me and I cant wait to use it for something :slight_smile:

selectItemWithVariable.xaml (8.9 KB)

one greenBoi please :wink:
image

@Mr_Meeseeks

It’s seeme like someissue with the xaml attached in the solution…

Getting the following error

Main.xaml: Compiler error(s) encountered processing expression “Element.FindFirst(FindScope.FIND_CHILDREN,New Selector(”“)).Get(“aaname”).ToString”.
Argument not specified for parameter ‘placeholderResolver’ of ‘Public Function FindFirst(scope As UiPath.Core.FindScope, selector As UiPath.Core.Selector, placeholderResolver As UiPath.Core.Activities.IPlaceholderResolver) As UiPath.Core.UiElement’

@Shubham_Varshney Sorry about that I got an error too. Reattaching - Main.xaml (9.3 KB)

Im still getting errors, heres the info I used:

Select Item Activity - element.FindFirst(FindScope.FIND_CHILDREN,new Selector(“”), variable1).Get(“aaname”).ToString

set strVal to type String
set element to type UiPath.Core.UiElement
set variable1 to type UiPath.Core.activities.IPlaceholderResolver
**Note - @Shubham_Varshney adds that this would be IVariableResolver for Enterprise **
hope this helps

4 Likes

@Mr_Meeseeks
Please add, in enterprise edition it needs Ivariableresolver in empty variable1 datatype :smiley:

2 Likes

how did you converter the Placeholder Resolver to String type.

hi @Manoj_Kumar5
We created a blank variable with datatype IPlaceHolderResolver

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