Intresting. It should select the value based on what you supply. The above statement looks absolutely fine to me.
Does it throw any error message ?
can you try ,
code:
Or you can overwrite QTP's select function by using your own select,
1. Grab all the items in the list by using the value property.
2. Split the values if they are semicolon separated.
3. Compare the value which you need to select vs the value in the split array.
4. Select based on the index.
this is a foolproof method because the index does not get hardcoded here. so, inspite of the shift in the value location it will still select the right one.
Does it throw any error message ?
can you try ,
code:
Code:
Browser("Calendar").Page("Calendar").WebList("Hour").Highlight
Browser("Calendar").Page("Calendar").WebList("Hour").Select "8"
1. Grab all the items in the list by using the value property.
2. Split the values if they are semicolon separated.
3. Compare the value which you need to select vs the value in the split array.
4. Select based on the index.
this is a foolproof method because the index does not get hardcoded here. so, inspite of the shift in the value location it will still select the right one.
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.
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.