[rspec-users] Story runner + selenium-rc + wait_for_xxxx

Mark Van Holstyn mvanholstyn at gmail.com
Wed Apr 16 17:13:21 EDT 2008


I have done this in the past...

def wait_for_ajax(timeout = 30000)
  wait_for_condition "window.Ajax.activeRequestCount == 0", timeout
end

def wait_for_effects(timeout = 30000)
  wait_for_condition "window.Effect.Queue.size() == 0", timeout
end

Mark

On Wed, Apr 16, 2008 at 3:57 PM, Andy Watts <andywatts at yahoo.com> wrote:

>
> Hi,
>
> I've got a story working with selenium-rc, but am stuck writing ajax-aware
> steps.
>
> How are people coding their story steps to wait for an Ajax event to
> complete?
>
>
> Here's what I've looked at so far.
>
> $browser.wait_for_element_present
> Looks Ideal, but not in selenium-ruby-client-drivers for some reason.
>
> def wait_for_ajax
>
>
> $browser.wait_for_condition("selenium.browserbot.getCurrentWindow().ServerConnection.isPending()
> == false", 2000)
> end
> This helper looked promising, but it returns
> SeleniumCommandError:
> selenium.browserbot.getCurrentWindow().ServerConnection has no properties
>
> Many Thanks
> Andy
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Story-runner-%2B-selenium-rc-%2B-wait_for_xxxx-tp16732279p16732279.html
> Sent from the rspec-users mailing list archive at Nabble.com.
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>



-- 
Mark Van Holstyn, Partner / Software Developer
mvanholstyn at mutuallyhuman.com, (616) 706-6842
Mutually Human Software, http://mutuallyhuman.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080416/689ce617/attachment.html 


More information about the rspec-users mailing list