see this http://wiki.openqa.org/display/WTR/Selection+Boxes

- Angrez

On Mon, Apr 6, 2009 at 5:48 PM, bwaybandit <lenridge...@gmail.com> wrote:

>
> you mean what is the "method" for selecting a value from the list.
>
> Try 'select'
>
> On Apr 6, 8:10 am, spike <vinaykumarl...@gmail.com> wrote:
> > Ya that's ok, but wat is the script for selecting a value from the
> > list.
> >
> > On Apr 6, 4:02 pm, JArkelen <johnvanarke...@gmail.com> wrote:
> >
> > > You should use "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" as the
> > > id for the select, not the id of the label....
> >
> > > On Apr 6, 12:09 pm, Angrez Singh <ang...@gmail.com> wrote:
> >
> > > > you are trying to access select_list using id of label. I think watir
> is
> > > > right in not recognizing the element. Correct?
> >
> > > > ie.select_list(:id, "ct100_ContentPlaceHolder1_IbISupervisor").
> >
> > > > "ct100_ContentPlaceHolder1_IbISupervisor" is ID for span & not
> select_list.
> > > > As per your HTML code "ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> is ID
> > > > for select list so you should try
> >
> > > > ie.select_list(:id, "ctl00_ContentPlaceHolder1_ddlSelectSupervisor")
> >
> > > > - Angrez
> >
> > > > On Mon, Apr 6, 2009 at 3:26 PM, spike <vinaykumarl...@gmail.com>
> wrote:
> >
> > > > > hello sir
> >
> > > > > I used ur solution but its not working i'm getting the following
> error
> >
> > > > > irb(main):011:0> ie.select_list(:id,
> > > > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > > > set("Select")
> > > > > Watir::Exception::UnknownObjectException: Unable to locate element,
> > > > > using :id, "
> > > > > ct100_ContentPlaceHolder1_IbISupervisor"
> > > > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > element.rb:52:
> > > > > in `assert_exists'
> > > > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > input_elements
> > > > > .rb:63:in `select_item_in_select_list'
> > > > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > input_elements
> > > > > .rb:47:in `set'
> >
> > > > > On Apr 6, 11:35 am, spike <vinaykumarl...@gmail.com> wrote:
> > > > > > Hi
> >
> > > > > > The following is the code written for a check list.
> >
> > > > > > <td class="cellLabel"><div id="ctl00_ContentPlaceHolder1_Div7"
> > > > > > align="right">
> > > > > >                  <span
> id="ctl00_ContentPlaceHolder1_lblSupervisor"
> > > > > > class="dataentrylabelsStyle">Supervisor :</span></div></td><td
> > > > > > class="cellInput"><select
> > > > > > name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor"
> > > > > > id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> > > > > > class="stylenormalTextbox">
> > > > > >                                         <option
> > > > > value="--Select--">--Select--</option>
> > > > > >                                         <option
> > > > > value="learner2">learner2</option>
> > > > > >                                         <option
> > > > > value="learner1">learner1</option>
> > > > > >                                         <option
> > > > > value="learner3">learner3</option>
> > > > > >                                         <option
> > > > > value="user2">user2</option>
> > > > > >                                         <option
> > > > > value="vinay">vinay</option>
> > > > > >                                         <option
> > > > > value="user3">user3</option>
> > > > > >                                         <option
> > > > > value="vinay1">vinay1</option>
> > > > > >                                         <option
> > > > > value="user_1">user_1</option>
> >
> > > > > > Now if i'm writing the command
> > > > > > irb(main):021:0> ie.select_list(:id,
> > > > > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > > > > set("vinay")
> >
> > > > > > I'm getting the following error
> >
> > > > > > Watir::Exception::UnknownObjectException: Unable to locate
> element,
> > > > > > using :id, "
> > > > > > ct100_ContentPlaceHolder1_IbISupervisor"
> > > > > >         from
> D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > > element.rb:52:
> > > > > > in `assert_exists'
> > > > > >         from
> D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > > input_elements
> > > > > > .rb:63:in `select_item_in_select_list'
> > > > > >         from
> D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > > input_elements
> > > > > > .rb:47:in `set'
> >
> > > > > > please suggest some solution we user .net technology for
> developing
> > > > > > website.
> >
> > > > > > thankingyou- Hide quoted text -
> >
> > > - Show quoted text -
> >
> >
> >
>

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

Reply via email to