Skip to content

Instantly share code, notes, and snippets.

@travis
Created July 13, 2011 19:53
Show Gist options
  • Save travis/1081182 to your computer and use it in GitHub Desktop.
Save travis/1081182 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