njnirmal -
I wish you explained it more briefly with either screenshots or more words. Could also help if you can write the code you have been using. Neverthless, I tried to decipher what you wrote and came up with the below,
Scenario 1 :-
1. You have combobox which has say 5 items. You want to run a script which will select each item until it ends with the 5th one. right ??
If yes, this is how you can do it, (assuming it is weblist)
Code:
Icount = Browser().page().frame().weblist().GetRoproperty("items count")
For i = 0 to Icount - 1
Browser().page().frame().weblist().Select "#"&i
Next
the above will select the item from first to the last based on the index.
Scenario 2 :-
1. You have a combobox which has 5 items. You want to select the item based on the name of the item available index wise.
Code:
allitems = Browser().page().frame().weblist().GetRoproperty("all items")
eachitem = Split(allitems, ";")
Icount = Browser().page().frame().weblist().GetRoproperty("items count")
for i = 0 to Icount - 1
Browser().page().frame().weblist().Select eachitem(i)
Next
Logically in my view both of them are same except that the way we are doing is different.
If the above two dont match what you were looking for, then please write up a clear and understanding scenario and i will get back to you.
Hope this helps
- basanth