This should also work

ie.select_list(:name => "select", :after? => ie.h2(:text, "Fine 
Art")).set("Drawing - In A Day")

Bret

Pallavi Sharma wrote:
> Have you tried multiple attributes and used index??
>
>
> ie.select_list(:name =>  "select", :index => 2).set("Drawing - In A Day")
>
> Try this. It should solve the issue.
>
> --
> Pallavi
>
> On Wed, Oct 28, 2009 at 7:38 AM, Ben <[email protected] 
> <mailto:[email protected]>> wrote:
>
>
>
>
>
>     Below is a sniplet of the  code of the web page.  I 'm trying to
>     test.
>     How can I select the option from the second list, the 'Fine Art'
>     section using WATIR?
>
>     For example
>
>     ie.select_list(:name,  "select").set("Drawing - In A Day")
>
>     WATIR wont let me because the system is looking at the list from the
>     'Craft' section. Thanks for your help.
>
>
>     <br><h2>Craft</h2>
>     <p>Some text </p>
>     <select name="select" size="1" onchange="redir(this)"><option
>     selected>*** CHOOSE ***</option>
>     <option value="crscm019.html">Candle Making</option>
>     <option value="crsdm200.html">Doll Making</option>
>     <option value="crsgs070.html">Glass Kiln Forming & Fusing</option>
>     <option value="crsje012.html">Jewellery - Wirework</option>
>     </select><br><br>
>
>     <br><h2>Fine Art</h2>
>     <p>Some text.</p>
>     <select name="select" size="1" onchange="redir(this)"><option
>     selected>*** CHOOSE ***</option>
>     <option value="crsfb030.html">Art - Folio Preparation</option>
>     <option value="crsdr071.html">Drawing - Basics</option>
>     <option value="crsdc300.html">Drawing - Caricatures</option>
>     <option value="crsdr001.html">Drawing - In A Day</option>
>     <option value="crspl040.html">Drawing - Pastels</option>
>     <option value="crstl110.html">Trompe L'Oeil Mural Illusion</option>
>     </select><br><br>
>
>
>
>
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to