Forum Discussion
Did you create a simple function, just to perform the listbox.ClickItem("GCT_1291_AUTO")?
TC will select the item name shown in the list, and not the value i.e. listbox.ClickItem("356c1d59-20a2-482f-bd88-80a9486980a3");
I did not convert it to a listBox, but I have an array of configList[i] that loops through and ClickItem does not work in that instance.
- rraghvani10 months agoChampion Level 3
I don't know the exact name mapping you have given for your control, hence I'm referring it to as listbox. I just want you to perform a very simple action, to perform a click on an item, using the ClickItem method.
- Semirxbih10 months agoContributor
I believe I have found a work-around, which at the moment is working with TC 15.61 & Edge v121:
Doesn't work:
for (var i = 0; i < configList.length; i++) {
if (configList[i] === configName) {
select.ClickItem(configName);
Delay(5000);
if (select.wText == configName) {
Log_Message("Found and selected configuration: " + configName, STEP_NORM);
exactMatchFound = true;
break;
}
}
}
Works:
for (var i = 0; i < configList.length; i++) {
if (configList[i] === configName) {
select.Click();
select.Keys(configName);
select.Keys("[Enter]");
Delay(5000);
if (select.wText == configName) {
Log.Message("Found and selected configuration: " + configName, STEP_NORM);
exactMatchFound = true;
break;
}
}
}
Not sure why select.Keys has such an impact, but this seems to be working as of right now.
Related Content
- 2 years ago
- 2 years ago
- 6 years ago
Recent Discussions
- 20 hours ago
- 20 hours ago
- 5 days ago