On Mon, Nov 8, 2010 at 4:03 PM, Usman Hussain <[email protected]> wrote: > > 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. >
Check out the docs for Watir::Select#options http://rdoc.info/github/jarib/watir-webdriver/master/Watir/Select#options-instance_method and Watir::ElementCollection#length http://rdoc.info/github/jarib/watir-webdriver/master/Watir/ElementCollection#length-instance_method So you want something like: browser.select_list(:id => 'allItems').options.length -- 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]
