Ethan Jewett wrote:
> Akash,
>
> Hopefully someone has a simpler solution, but my solution was to mixin
> (using a module) a new method to the offending class (in your case
> "SelectList") called select_no_wait(item).  The contents of this
> method would be the same as the select(item) method, but without the
> @container.wait.
>
> My problem was with the IE.goto method, not with list selection, so
> the execution won't be quite the same, but the idea is there.
>
> I don't have much time right now, but if no one responds with another
> fix within the next 12 hours or so, I'll try to post the code that
> should do that job.
>
> Ethan
>   
I don't think that will be enough. Take a look at the click_no_wait code.

    def click_no_wait
      assert_enabled

      highlight(:set)
      object = "#{self.class}.new(self, :unique_number,
#{self.unique_number})"
      @page_container.eval_in_spawned_process(object + ".click!")
      highlight(:clear)
    end

The key issue is not so much avoiding the wait, but spawning a separate
process to execute the method. In your case it will need to be the
select method instead of "click!". Technically, click_no_block would be
a more accurate name for this method.

It seems like Watir needs a more general syntax for these kinds of
methods...

Bret



_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to