Hi Lisa,

I think I found an example you're using here:

http://www.upscale.utoronto.ca/test/dojo/tests/widget/test_Select.html

I'm looking at Select #2 (dataUrl, autocomplete=true). The only way I
could get it to work is by using send_keys:

b = Watir::IE.attach(:title, /Dojo/)
test_field = b.span(:class => "dojoComboBoxOuter dj_ie", :index =>
2).text_field(:class, "dojoComboBox")
test_field.focus
b.send_keys("florida")
sleep 2
b.send_keys("{ENTER}")


On May 23, 12:44 pm, Lisa Crispin <lisa.cris...@gmail.com> wrote:
> We are changing what used to be regular drop-down select list boxes to a
> dojo widget thingie that allows type ahead to select the item. Here's the
> HTML:
>
>     <select dojoType="dijit.form.FilteringSelect" id=advisor.dealerId
> name=advisor.dealerId style='width: 550px;'>
>
>                     <option value="0" >
>
>             </option>
>
>                     <option value="1059" >
>                 1717 Capital Management / 300 Continental Drive /
> Suite 3 South / Newark, DE 19713-4329 /
>
>             </option>
> ...etc
>
> I thought I could use text_field to set a value here, just as if I typed it
> manually on the page. I tried "ie.text_field(:id,
> 'advisor.dealerId').set(<some value>). When I do this in irb, I see it set
> the value, but when I submit, it shows the default value was selected
> instead. I also tried fire_event("onclick"), that didn't help.
>
> We were able to get our Canoo WebTest scripts to select these with its
> "forceHiddenInputField" step. I thought maybe I could do something similar
> in Watir with "input type=hidden", but I can't get the syntax right and I
> can't find any examples. I can't figure out where I would put "input
> type=hidden" in my text_field step.
>
> Would someone please point me to examples that might help me figure this
> out? I apologize if this is an ignorant question. I searched the mailing
> list and the Watir site but I could not figure out how to make this work.
> thanks,
> Lisa
>
> --
> Lisa Crispin
> Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
> and Agile Teams_ (Addison-Wesley 2009)
> Contributor to _Beautiful Testing_ (O'Reilly 2009)http://lisacrispin.com
> @lisacrispin on Twitterhttp://entaggle.com/lisacrispin

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