06-06-2013, 02:30 AM (This post was last modified: 06-06-2013, 03:10 AM by qtpbeginner78.)
Hi All,
I have this dropdown which is having the name of occupations. (long list)
When i try to select a value manualy i have to click the dropdown twice to load the items. On the first click, it will display an empty list. (please see the screenshot)
After sometimes it loads the items in the list. I tried to automate this in QTP. But QTP cannot select a value from it.
i=0
Do
oItems = browser().page().weblist().GetROProperty("items count")
If oItems <> 0 then
browser().page().weblist().click
browser().page().weblist().select(4)
Exit Do
End If
wait 1
i=i+1
Loop Until oItems <> 0 or i>20
Basanth Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
06-07-2013, 02:28 AM (This post was last modified: 06-07-2013, 02:30 AM by qtpbeginner78.)
Hi,
Just couple of seconds, say 5. On the first click it loads the empty list and on the second click it loads the items in like 5 seconds. I have no idea why it doesnt click at runtime.
i=0
Do
browser().page().weblist().Click
oItems = browser().page().weblist().GetROProperty("items count")
If oItems <> 0 then
browser().page().weblist().click
browser().page().weblist().select(4)
Exit Do
End If
wait 1
i=i+1
Loop Until oItems <> 0 or i>20
Basanth Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.