Created
June 15, 2010 20:03
-
-
Save chrisvariety/439641 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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