Hi,
Requirement:- In run time I have to get the select value for an object.
For example: I have to get selected value for “Drop down” box or “List box” or “text box”.
Text box value is available in property “Text”
Drop down box value is available in property “wText”
List box value is available in property “wSelectedItems”
var GetTextValue, ObjectType, ex;
ObjectType = aqObject["GetPropertyValue"](ObjectName, "ObjectType");
switch (ObjectType)
{
case "Textbox": //Text Box
GetTextValue = aqObject["GetPropertyValue"](ObjectName, "Text");
break;
case "Select": //Dropdown
GetTextValue = aqObject["GetPropertyValue"](ObjectName, "wText");
break;
case "Select": //List box
GetTextValue = aqObject["GetPropertyValue"](ObjectName, "wSelectedItems");
break;
}
Based on the object type the selected value will be differ.
Name |
Object Type |
Value |
Text Box |
Textbox |
Text |
Dropdown |
Select |
wText |
List Box |
Select |
wSelectedItems |
I am getting the “Object Type” value in run time.
ObjectType = aqObject["GetPropertyValue"](ObjectName, "ObjectType");
Both Dropdown and list box contain the same object type as “Select”. But the value is available in different property like “wText” and ”wSelectedItems”.
1. Please let me know how to differentiate the two objects? (I have searched the different properties but I didn’t get)
2. Let me know how to use the “wText” and ”wSelectedItems” in the above switch case.
Thanks...