I haven encountered the same issue...When using the select method a
pop-up box occurs, but when I added the no_wait routine the code just
ends up in the wait for pop-up routine and no pop-up appears....From
what I can, the code gets into the no_wait method fine, but it never
reaches the select method of the select list...A few interesting
tidbits:  I noticed some chatter about a patch for
eval_in_spawned_process for a click_no_wait issue as well as a radio
button no wait issue, so I did implement that with high hopes it might
fix my issue, but alas, no luck...What is interesting is that this
same code has worked on IE6...It sets the select list and handles the
pop-up correctly...

Any advise would be greatly appreciated!


On Feb 16, 3:25 am, Bill Xu <xulei8823...@gmail.com> wrote:
> Hi:
>    I want to use select_no_wait function (I am testing on a dropdown control
> and while you select the dropdown control, it pops up download file page),
> select_no_wait is the function i got 
> fromhttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups(iteam 6)
> but it seems does not work. It can not trigger the select operation. Do you
> have some ideas? (system will hang when run to select_no_wait function
> and the pop up window will not show up)
> #sample code#
> #select_no_wait method for select lists - needed for popups resulting from
> select lists
> module Watir
>     class Element
>         #select_no_wait - selects a drop-down element spawning a new
> process.
>         #this is needed to close potential pop-ups that select drop-down can
> trigger.
>         def select_no_wait(item)
>             assert_enabled
>             puts "calls select_no_wait function"
>             highlight(:set)
>             object = "#{self.class}.new(self,
> :unique_number,#{self.unique_number})"
>             @page_container.eval_in_spawned_process(object +
> ".set('#{item}')")
>             highlight(:clear)
>         end
>     end
> end
> def save_file(filepath)
>     ai = WIN32OLE.new("AutoItX3.Control")
>     ai.WinWait("File Download", "", 5)
>     ai.ControlFocus("File Download", "", "&Save")
>     sleep 1
>     ai.ControlClick("File Download", "", "&Save", "left")
>     ai.WinWait("Save As", "", 5)
>     sleep 1
>     ai.ControlSend("Save As", "", "Edit1",filepath)
>     ai.ControlClick("Save As", "", "&Save", "left")
>     ai.WinWait("Download complete", "", 5)
>     ai.ControlClick("Download complete", "", "Close")
>   end
> #main code#
> $ie.select_list(:id,"_id0:actions").select("Generate Default Template")
> save_file("C:\\file1.txt")
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: 
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to