Try this
To select individual attribute :-
browser.select_list(:name, "phone_type").select("M")
On 25 February 2011 11:58, Rajiv Nanduani <[email protected]>wrote:
> Hi All,
>
> I am facing a problem with watir for list box object. I have to extrach the
> value of select item in list box instead of text value Like..
>
> <select size="1" name="phone_type">
> <option value="">- Select One ------------------</option>
> <option selected="" value="M">Mobile Phone</option>
> <option value="O">Daytime Phone</option>
> <option value="H">Evening Phone</option>
> </select>
>
> Here i need the value property value like M , O , H
>
> please suggest how to get this value using watir/ruby
>
> --
> RAJIV KUMAR
>
> <http://rajivkumarnandvani.wordpress.com/>
> <http://learnqtphelp.blogspot.com/>
>
>
> --
> 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]
>
--
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]