12-17-2009, 12:59 PM
Hi All,
Please have a look at my code given below:
My doubt: Is there a mistake in the code ? Can I pass a variable as the range in RandomNumber??? When I run this script lines 3 and 5 always select '1' item in the list and I see line 5 fails at times showing - object was not found.
Please help me where have I gone wrong ????
Thanks
Swetha
Please have a look at my code given below:
Code:
1. For i = 1 to 3
2. Mrkt = Browser("TalonPro Solutions").Page("TalonPro Solutions").WebList("Market").GetTOProperty("items count")
[color=#32CD32]'trying to get number of items in the Market list.[/color]
wait(5)
3. Browser("TalonPro Solutions").Page("TalonPro Solutions").WebList("Market").Select RandomNumber(1, Mrkt )
[color]'Selecting a random number for the list Market in the range 1 to Mrkt (variable defined in the earlier set)[/color]
wait(5)
4. loctn = Browser("TalonPro Solutions").Page("TalonPro Solutions").WebList("Location").GetTOProperty("items count")
[color]'trying to get number of items in the Location list[/color]
wait(7)
5. Browser("TalonPro Solutions").Page("TalonPro Solutions").WebList("Location").Select RandomNumber(1,loctn)
[color]Selecting a random number for the list Market in the range 1 to loctn (variable defined in the earlier set)[/color]
Next
Please help me where have I gone wrong ????
Thanks
Swetha