Desktop application: Can I use “select item” option to store all the drop down items in a variable. Because I can’t able to get the items using find children.
Please suggest!!!
Desktop application: Can I use “select item” option to store all the drop down items in a variable. Because I can’t able to get the items using find children.
Please suggest!!!
Select Item doesn’t store things, it selects an item. Find Children works fine.
I can’t able to get the child items by using find children. But I’m getting all the list by using select item. Is there any other way to solve this problem
If you can’t get them with Find Children then you have it configured wrong. Did you set it to FIND_DESCENDANTS?
Find children only I have used. I’m using thsi solution for desktop application testing
FIND_DESCENDANTS is a setting in the Find Children activity.
Oh Then I have to use descendants right. I will check with descendants.
Using Find Children…
"<webctrl tag='OPTION' />"
Now run it and your variable will be an IENumerable of the UI Elements which you can now loop through and do other things with.
Remember, the UI Element is an object with many properties. The output of Find Children is not the text of the pulldown options, it’s the UI Element objects. So you have to then get the attribute you want such as innertext:
Thanks @postwick. I want to use this for desktop application testing. So in selector what should I give.
If you’re trying to get the values in a pulldown then you indicate that pulldown.
It’s working well. But one doubt in below image
I want to store this values as list. In get attribute save to is accepting only string. So I have given string as data type instead of list of strings.(UISTRING is of data type string only)
I want to store this items as list
The Save To just saves the value of the name attribute for that one UI Element that the loop is currently on.
You don’t even need the Get Attribute activity. Do this…
OptionList.Concat({ITEM.Get("name").ToString})
After the loop is complete, OptionList will be a list of the values.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.