select.ClickItem selecting wrong dropdown value
Hey all,
So I am working on Automation Scripting for my employer and we are currently on "Version: 15.53.2.7" of SmartBear and not being able to upgrade just yet. We all got forced to upgrade to v120 of Microsoft Edge.
Currently, I am running into an issue where select.clickItem() is selecting the wrong dropdown value and I tried multiple different methods to fix it, but I am unsuccessful, so wanted to reach out and see if anyone might have some advice.
So let's say that I have the following code: configList = aqObject.GetPropertyValue(select, "ContentText");
This returns:
Import
Import Existing Config
Import_1
Import_11
Import_1_v1-0-0
Import_3
Import_GCT_1290
Import_v1_0
ImportTest
Then I have the following code, which pattern matches my configName and looks for it in the configList:
var escapedConfigName = configName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
var pattern = "\\b" + escapedConfigName + "\\b";
var regex = new RegExp(pattern);
if (regex.test(configList)) {
select.ClickItem(configName);
} else {
Log_Message("Configuration not found: " + configName, STEP_WARN);
}
escapedConfigName is Import_1_v1-0-0.
It finds the dropdown and when it selects it, the dropdown value is selected as ImportTest.
I have seen that there are major issues with ClickItem, but has anyone found a workaround possibly?