Hi Guys,

Im using watir-webdriver and ive come across a small problem.

here is the HTML:

<select size="8" name="allItems" style="width: 100%;" id="allItems">
      <option value="/content/managedasset/newsinternational/slideshow/
USMAN">/content/managedasset/newsinternational/slideshow/USMAN</
option>
      <option value="/content/managedasset/newsinternational/slideshow/
in_100_percent_welcome">/content/managedasset/newsinternational/
slideshow/in_100_percent_welcome</option>
      <option value="/content/managedasset/newsinternational/slideshow/
in_meg2k">/content/managedasset/newsinternational/slideshow/in_meg2k</
option>
      <option value="/content/managedasset/newsinternational/slideshow/
in_breakfastbingo">/content/managedasset/newsinternational/slideshow/
in_breakfastbingo</option>
      <option value="/content/managedasset/newsinternational/slideshow/
in_cashnbargains">/content/managedasset/newsinternational/slideshow/
in_cashnbargains</option><option value="/content/managedasset/
newsinternational/slideshow/in_200_percent_welcome">/content/
managedasset/newsinternational/slideshow/in_200_percent_welcome</
option>
      <option value="/content/managedasset/newsinternational/slideshow/
in_raf">/content/managedasset/newsinternational/slideshow/in_raf</
option><option value="/content/managedasset/newsinternational/
slideshow/in_reload">/content/managedasset/newsinternational/slideshow/
in_reload</option>
</select>

there are two things i need to happen here.
The last option tag was added by myself. so i need to find out how
many options tags there are so that i can move my new option to the
top of the list.

The reason for this is because i do not know how many options there
will be in the list so i do not know how many times i have to click on
the UP button to get my option to the top of the list.

Any help would be great help.

Kind regards,
Usman Hussain

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to