You misspelled the method name and you need to use the right method or
arguments:

set to set based on the text:
ie.select_list(:id,"ctl00_ContentPlaceHolderBody_ComboBoxStoreName").set("changsha
one")

or select_value to select the value:
ie.select_list(:id,"ctl00_ContentPlaceHolderBody_ComboBoxStoreName").select_value("120")


Charley Baker
blog: http://blog.charleybaker.org/
Lead Developer, Watir, http://wtr.rubyforge.org
QA Architect, Gap Inc Direct


On Sun, Jun 14, 2009 at 2:48 AM, jane.liu <jane.li...@hotmail.com> wrote:

>
> I am a new watir leaner.
> I have some issue with combobox for watir
>
> code file is:
>
>  <select xtype="combo" ext_errIcoOffset="0" ext_height="18px"
> ext_selectOnFocus="true" ext_forceSelection="true" ext_mode="local"
> ext_displayField="Text" ext_valueField="Value" ext_maxHeight="300"
> ext_listWidth="-1" name="ctl00$ContentPlaceHolderBody
> $ComboBoxStoreName" onchange="javascript:setTimeout('__doPostBack
> (\'ctl00$ContentPlaceHolderBody$ComboBoxStoreName\',\'\')', 0)"
> id="ctl00_ContentPlaceHolderBody_ComboBoxStoreName" style="height:
> 18px;">
>        <option value="-1">--Please choose--</option>
>        <option value="120">changsha one</option>
>        <option selected="selected" value="131">Alberta</option>
>
> </select>
>
> i wirite ruby for :
> ie.select_list(:id,
> "ctl00_ContentPlaceHolderBody_ComboBoxStoreName").select_vaule
> ("changsha one")
> but it prompt me:
> undefined method `select_vaule' for #<Watir::SelectList:0x302576c>
> (NoMethodError)
>
> i hope someone can help me,thanks
>
> best regard!
>
> Jane
>
> >
>

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