When i send keys and add a click inside the Keys it then passes "Undefined"
When i send keys and add a click inside the Keys it then passes "Undefined" plus the correct data to the dropdown
Below is my code, see attached for dropdown layout, even when i separate the function calls, it clicks the dropdown and by the time it gets to the second line the pop up list disappears.
a.Click();
b.Keys(aqString.Trim(tempPathName, aqString.stAll));
b.Keys("[Tab]");
var PathName = eval(genericPath);
var tempPathName = context1.get(dataName);
var objNames = objName;
if(aqString.GetLength(tempPathName) != null) {
b = PathName.PwcAutoComplete(objNames).TextInput(0);
a = PathName.PwcAutoComplete(objNames).Button(0);
if((b.Exists) && (b.Enabled == true)) {
var fieldContent = getInputValue(b);
b.Keys(a.Click() + aqString.Trim(tempPathName, aqString.stAll));
b.Keys("[Tab]");
genCheckAlertFormPWC();
}
} else {
Log.Warning("The Supplied data is not valid for the field, please check the data and try again.");
aqUtils.Beep();
}
I found a solution, created a new function to my click that returns an empty string. Works like a charm
Thanks.
function myButtonClick(a)
{
a.Click();
return("");
}
b.Keys(myButtonClick(a) + aqString.Trim(tempPathName, aqString.stAll));