Forum Discussion
I've seen this type of behavior before when the contents of the dropdown list are created dynamically. In other words, the items that appear in the list aren't generated/populated until the list is displayed. A three or four step process might do the trick for you.
The four step approach I would try is this:
- Drop down the combo list
- Delay 250 ms so the combo can populate
- Refresh TestComplete's object list so that you know it has the list items
- Click the item you want
Sadly, I don't do JavaScript. I'm a VB script only guy. In VBScript that would look something like this:
Set TestCombo = browser.pageLeaveHomePageGc.framePtifrmtgtframe.formW3lvLeaveTranG.selectGDerivedW3lvDescr500
TestCombo.DropDown
Delay 250
TestCombo.Refresh
TestCombo.ClickItem("Vacation")
I think you should be able to accomplish that in a Keyword test using the available functions. I'm more than a little out of practice using keyword tests.
Best regards,
John
P.S. Pro tip on name mappings. Shorten those names up and standardize the terms when you create them. Life will be easier in the future if you do that. The ones TestComplete creates are always too long. It makes reading code painful.
I try to keep them to a max of ten to twelve characters when I can. For "select" I'd use "sel". For "frame" maybe "frm". Use whatever makes sense to you and be consistent.
Related Content
- 2 years ago
- 2 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago