Created
October 11, 2012 21:48
-
-
Save zephyr-dev/3875727 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
find(".select2-input").set(friend.name) | |
wait_for_dom # wait for ajax search to return | |
find(".select2-result-label").click | |
page.should have_content(friend.name) | |
def wait_for_dom | |
uuid = SecureRandom.uuid | |
page.evaluate_script <<-EOS | |
_.defer(function() { | |
$('body').append("<div id='#{uuid}'></div>"); | |
}); | |
EOS | |
page.find("##{uuid}") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment