Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use the data from the combo box
#1
Solved: 10 Years, 8 Months, 4 Weeks ago
HI
I am using one web application ? Now i want to the Combo box data for the input .. How its possbile.. ? For example if one combo box has a 4-5 item now i want to use all these for item as a input paramter for each itteration ? What would be the script for this. ?
Help me out ..
Thanks in Advance
Reply
#2
Solved: 10 Years, 8 Months, 4 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


Forum Jump:


Users browsing this thread: 1 Guest(s)