Dropdown clickitem
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dropdown clickitem
I'm trying to selectitem in a drop down using record/playback. The issue is the dropdown is constantly getting updated, and if the record is not visible in the first 10 records then I'm unable to select it.
i.e.
Dropdown
A
B
C
D
E
F
I am able to select A through F, but if I try to select Z, it cannot find it even though testcomplete recognizes that there are 50+ records in the dropdown. Any way aside from trying to get testcomplete to scroll the bar down that I can consistently select any record from the dropdown?
Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What code are you using to do the selection? Technically speaking object.ClickItem('itemtext') should select the item, regardless of how many items in the drop down. Are you using that method or something else?
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the response
Aliases.browser.mywebsite.selectCustomer.ClickItem(customername);
I've tested this multiple times, every time the record falls within the visible records when first opening the dropdown, it works, if not, it fails, not sure if it's a timing issue or something else.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It probably is a timing issue... the contents of the drop down are probably not fully populated yet.
Something you can try... I BELIEVE, for most such components, there is a "DropDown" method. Call that first, followed by a SelectItem method and see if that does what you need it to do.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
