DropDown() / ClickItem() Timing out
Hello All,
Encountering a weird problem when interacting with a dropdown menu in a web app that I'm testing in Chrome. Sometimes it works as expected and the test advances. However, the majority of the time it has started to fail. The code executes, the drop down menu opens on screen, but then Testcomplete hangs and eventually times out while "Waiting until the drop-down box appears". The log then generates the following error message: "The drop-down box cannot be opened".
First attempt:
const taskDropDown = subPage.FindElement("#selTask");
taskDropDown.ClickItem("CAC Badge");
Then read some help posts and modified my code to what's below to try and give it some time to load everything:
const taskDropDown = subPage.FindElement("#selTask");
taskDropDown.DropDown();
Delay(1000);
taskDropDown.ClickItem("CAC Badge");
Still fails with the same problem, except now instead of timing out on ClickItem(), it times out on DropDown().
Any help on how to resolve is appreciated!
Thanks Marsha, so the Object name did not change after refreshing But... there is a GET request appending a query string to the URL on the page the dropdown is on. On a lark I moved my wild card a little further down the URL string closer to the query string that's being stored in my subPage variable and it has, thankfully, started working again...