tristaanogre
I have used the following functions for the drop down where DropDownValue is the expected value we are passing. We found that in case for application where it is not working (as attached in the previous screenshot) it contain some characters after the last parenthesis whose char code is 8206. That is why it do not click the item in drop down. from the UI perspective it look like it is space and I was passing the value with space.
function SelectDropdownValue(DropdownObj, DropdownValue)
{
var SelectDropdownValueSuccess = false;
try
{
if(DropdownObj.WaitProperty("Exists", true, 5000))
{
// DropdownObj.ClickItem(DropdownValue);
var DropdownCount = DropdownObj.wItemCount;
for(i=0; i<DropdownCount; i++)
{
Log.Message(DropdownObj.wItem(i));
// Log.Message(DropdownValue);
if(aqString.Compare(DropdownObj.wItem(i),DropdownValue,false) == 0)
{
DropdownObj.ClickItem(DropdownValue);
SelectDropdownValueSuccess = true;
break;
}
}
if(SelectDropdownValueSuccess == false){
Log.Error("No Values are found");
}
}
}catch(e) {
Log.Error("Exception Occurred: " +e);
}
// return SelectDropdownValueSuccess;
}