I've also been intending to make this work:

  ie.select_list(:name, 's').option(:value, 'v2').select

The work for this is half-done.

I would appreciate hearing whether users think this interface would be desirable. (The old one would also be retained.)

Bret

At 09:09 PM 7/12/2005, Paul Rogers wrote:
"urn:schemas-microsoft-com:vml" xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:w = "urn:schemas-microsoft-com:office:word"> there is a select_value method, although it is poorly documented. You would use it like this:

html:
<select name=s><option value=v1>Option1</option><option value=v2>Option2</option></select>


ruby
ie.select_list(:name, 's').select_value('v2')

We should add improvements to these docs to our todo list for this next release

Paul

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tuyet Cong-Ton-Nu
Sent: 12 July 2005 15:14
To: '[email protected]'
Subject: [Wtr-general] Select using Value

I want to use the value rather than the text since the text has spaces in it, but I don't know if doing select by value is supported since I got an error: irb(main):017:0> ie.frame("customizeRemoteContent").select_list(:id, "availableColumnsSelectBox").select("|SYSTEM|AUSTRALIAN").fire_event("ondblclick") Watir::Exception::NoValueFoundException: Selectbox was found, but didn't find it
em with text of |SYSTEM|AUSTRALIAN
from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3306:in `select_item_in_sel
ect_list'
        from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3284:in `each'
from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3284:in `select_item_in_sel
ect_list'
        from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3261:in `select'
        from (irb):17
        from :0

I also tried using the text but don't know how to handle the spaces (please see HTML below this)? irb(main):014:0> ie.frame("customizeRemoteContent").select_list(:id, "availableColumnsSelectBox").select(" AUSTRALIAN").fire_event("ondblclick") Watir::Exception::NoValueFoundException: Selectbox was found, but didn't find it
em with text of     AUSTRALIAN
from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3306:in `select_item_in_sel
ect_list'
        from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3284:in `each'
from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3284:in `select_item_in_sel
ect_list'
        from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3261:in `select'
        from (irb):14
        from :0

HTML:

: 300px\" name=\"availableDiv\"><SELECT id=availableColumnsSelectBox ondblclick= javascript:expandCollapseAvailableColumns() style=\"WIDTH: 301px; HEIGHT: 1930px \" multiple size=148 name=availableColumnsSelectBox><OPTION class=folderNode id= |System value=|System name=\"|System\">-Descriptive Data</OPTION><OPTION id=|Sys tem value=|System|AUSTRALIAN name=\"|System\"> AUSTRALIAN</OPTION><OPTION
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_____________________
 Bret Pettichord
 www.pettichord.com

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to