Skip to content

Instantly share code, notes, and snippets.

@chrisvariety
Created June 15, 2010 20:03
Show Gist options
  • Save chrisvariety/439641 to your computer and use it in GitHub Desktop.
Save chrisvariety/439641 to your computer and use it in GitHub Desktop.
module Pyrite
module Dsl
# Wait for a specific element, the page to load
# or an AJAX request to return
def wait_for(element)
case element
when :page_load
browser.wait_for_page_to_load 10
when :ajax
browser.wait_for(:wait_for => :ajax, :javascript_framework => Pyrite.js_framework)
else
browser.wait_for :element => "css=#{element}"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment