You can do something like this: select_list = b.select_list(:name => 'xxx') select_list.option(:value => select_list.value).text
Or a different solution in one line: b.select_list(:name => 'xxx').selected_options[0].text Jarmo Pertman ----- IT does really matter - http://itreallymatters.net On Monday, October 1, 2012 8:45:53 PM UTC+3, enroxorz wrote: > > I am having the following issue. The API changes for SelectList has > changed, and caused one of our scripts to fail. > > Before 3.0 changed > > <select name="xxx" size="1"> > <option value="1" selected="selected">XXX</option> > <option value="2">YYY</option> > <option value="3">ZZZ</option> > </select> > > > b.select_list(:name => 'xxx').value > XXX > > After 3.0 changes > > <select name="xxx" size="1"> > <option value="1" selected="selected">XXX</option> > <option value="2">YYY</option> > <option value="3">ZZZ</option> > </select> > > > b.select_list(:name => 'xxx').value > 1 > > How can I get the value as if it were before the 3.0 changes? > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com