I’m a beginner in UiPath and I’m having a bit of trouble implementing 3 scenarios.
so it starts like this: on the web page, User puts a reference code e.g 1234APK in the search bar and then clicks search; one of 3 things are expected to happen -
To put this into perspective; The items in the dropdown change dynamically sometimes based on input value, if the ref code above (1234APK) gives cat, dog, rat in the dropdown for example, a different ref code; say 1245LKO may give fish, chicken, rat. Rule of thumb is always to choose ‘rat’. ‘Fish’ is always the secondary option.
Logic is: if ‘rat’ is present in dropdown, (irrespective of ‘fish’ being present or not) then ‘rat’ should always be chosen,
if ‘rat’ isn’t available, choose ‘fish’
else i.e. if ‘rat’ nor ‘fish’ isn’t found in the dynamic dropdown items, terminate process.
Not sure if I was able to convey this clearly but I would appreciate any form of help
Sorry Mukesh but would it be possible to see a visual process of the array of String conditions in uipath? Because now I have 3 types of ListItems, do I name them ListItems1, ListItems2, ListItems3? It would be incredibly helpful to see this visually in uipath. Thank you
Hi Mukesh, thanks for sending the screenshots. Do you mind if I see the properties tab for ‘Get Attributes activity’? I think I may have missed out on some important elements as I’m still having issues. Thanks for your patience
Let me try to explain what is happening in the Flow -
We Attach the Browser and Point it to the page where we have the DropDown
We use Find Children and point it to the Dropdown. This Result is a List of UI Elements called Child… Now Child will have 5 Ui Items Assuming we have 5 element in dropdown
3.Now we have to extract the item information from each of ui element from child - hence we use a foreach loop and loop items in child.
Inside Foreach we have used the get attribute and defined innertext meaning - the name we want is in the attribute innertext - The output is stored in variable called Output.
Now we have created a List of String - This list of string will be holding all the 5 items from the dropdown’.
Hence - Add to Collection is used - Output.Trim is used just to remove the extra spaces that might come.
After the for each loop completes, we would have a list of string consisting of all the items from Dropdown.
Next we validate the List of Strings for our Condition.