Hi,
I had a dropdown where web has some values. Now i want to select the value from dropdown. Issue is if value is not present from list then i have to select others from dropdown and if value exits in dropdown then i need to select that value. How we can do this.
I know about find children using that we extract the list of value from dropdown but how we can do further like if value exits in list then i select that if not exits then i select other text from dropdown.
Screenshot of dropdown.
ppr
(Peter)
August 24, 2022, 10:13am
2
then you will get the collection of uiChildren which you can postprocess
using if activity and reacting if value was present in uichildren collection or the derived values list
uiChildren - Output from find chidren
Condition for the check:
uiChildren.Any(Function (x) x.Get(“innertext”).toString.Trim.Equals(“YourTestString”))
which will return true or false
Hi @ppr
What we put in place of X
ppr
(Peter)
August 24, 2022, 10:25am
4
x is like local variable which we use in the LINQ
LINQ is part of the .NET framework and offers capabilities for interacting with data, objects or other sources within a particular syntax.
This HowTo introduces on starting with LINQ (Language-Integrated Query).
Current Version of this topic is DRAFT and will be finalized / enhanced soon
Introduction
Typical tasks for implementing parts of an automation project are interacting with e.g. with data in a datatable or items from collections. LINQ can help to implement it into a compact and stand…
In my Case it look like
EngMfgChildren.Any(Function (EngMfgChildren) EngMfgChildren.Get(“innertext”).toString.Trim.Equals(EngMFG))
Where
EngMfgChildren is uichildren variable
EngMFG this variable is having value which i am searching in list
Sorry for bothering
Is this correct?
it showing error to me
ppr
(Peter)
August 24, 2022, 10:47am
7
lets assume EngMfgChildren is the output from findchildren
EngMFG is a string Variable with the vlaue you want to check
EngMfgChildren.Any(Function (x) x.Get("innertext").toString.Trim.Equals(EngMFG))