07-27-2012, 06:55 AM
Hi guys, I'm trying to select an item from a JavaList using QTP 10. I am able to select an item from the JavaList using this code:
The problem is, when you select a value from that JavaList object, it triggers an event wherein data is loaded into the JavaTable below it (eg: I select Beverage from the list, then a list of beverages will appear on the JavaTable). I don't have any problems doing this manually (everything goes as it should), but when I automate it, QTP is able to select the selected item from the list, but after data is loaded into the table (and I check/select values from that table), the item in the list goes back to its default value, resulting in an error message in the program (did not select an item).
Anyone got a remedy on how I can solve my problem?
Code:
objWindow.JavaList(strIdentifier).Select selectedItem
The problem is, when you select a value from that JavaList object, it triggers an event wherein data is loaded into the JavaTable below it (eg: I select Beverage from the list, then a list of beverages will appear on the JavaTable). I don't have any problems doing this manually (everything goes as it should), but when I automate it, QTP is able to select the selected item from the list, but after data is loaded into the table (and I check/select values from that table), the item in the list goes back to its default value, resulting in an error message in the program (did not select an item).
Anyone got a remedy on how I can solve my problem?