简体   繁体   中英

QTP WinComboBox Selection Error

I have a "WinComboBox" on a webpage. Then I try to select item in it by index. The code is like :

Browser("Browser").Page("Page").WinComboBox("List").Select 5

Then sometime the selection goes well, sometimes not when the 3rd or 4th item displays for a while in the wincombobox and changes to the 5th at the last moment. Then the script keeps going on. The problem is, in the situation, even 5th item seems well selected, the web application still thinks that the one stays for a long time is the one selected, so the test goes wrong. I've tried a lot of ways, no successful solution. And the values of the items in the combobox are really not regular charactors, so I cannot verify them.

I wonder if someone could enlight me. Many thank in adance.

Allen

You should not have a WinComboBox under Page there should either be web based test objects or some kind of ActiveX/Java. Try to load all apropriate addins to the application you're testing and see if you can get a more appropriate test object.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM