I have lots of options like this one:

<option id="http://semanticweb.databaserepublic.com/c2p/systemData/
searchField#attachmentTargetItself" value="341" title="true,Inner
Search,^50$|^62$|^56$,attachmentTargetItself">Attachment::</option>

and I am trying to capture all options with title x.

As I know option is detected only by value or text. How can I get the
title from the html above?


On Dec 8, 9:11 am, Super Kevy <kpe...@scholarshipamerica.org> wrote:
> using youroptionfragment I modeled a quick form:
>
> Save as C:\ruby\testing\klp1.html
> <html>
> <head>
> <title>MyTest</title>
> </head>
> <body>
> <form name="input" action="html_form_action.asp" method="get">
> Username: <input type="text" name="user" />
> <form action="">
> <select name="cars">
> <optionid="a2" value="volvo">Volvo</option>
> <optionid="a3" value="saab">Saab</option>
> <optionid="a4" value="fiat">Fiat</option>
> <optionod="a5" value="audi">Audi</option>
> <optionid="http://semanticweb.databaserepublic.com/c2p/systemData/
> searchField#attachmentTargetItself" value="341" title="true,Inner
> Search,^50$|^62$|^56$,attachmentTargetItself">Attachment::</option>
> </select>
> <input type="submit" value="Submit" />
> </form>
> </body>
> </html>
>
> require 'rubygems'
> require 'watir'
> ie = Watir::IE.new
> sUrl='C:\Ruby\Testing\KLP1.html'
> ie.goto(sUrl)
> ie.maximize()
> ie.bring_to_front()
> sleep 3
> puts 'Select Attachment from the select list'
> ie.select_list(:name,'cars').set('Attachment::')
> sleep 3
> puts 'Attachment should be selected'
>
> I'm totally confused what you're trying to select...

-- 
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

Reply via email to