Skip to content

Instantly share code, notes, and snippets.

@kinsteronline
Forked from travis/gist:1081182
Created November 30, 2011 14:14
Show Gist options
  • Save kinsteronline/1409202 to your computer and use it in GitHub Desktop.
Save kinsteronline/1409202 to your computer and use it in GitHub Desktop.
def complete_facebook_connect
within_window "Log In | Facebook" do
fill_in 'Email:', with: fb_user.email
fill_in 'Password:', with: fb_user.password
click_button "Log In"
# syncronization makes this never return, maybe because
# it's running in a different window?
without_resyncronize { click_button "Allow" }
end
end
def without_resyncronize
page.driver.options[:resynchronize] = false
yield
page.driver.options[:resynchronize] = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment