Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use the data from the combo box
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
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
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.
Reply


Messages In This Thread
RE: How to use the data from the combo box - by basanth27 - 08-10-2009, 12:01 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)