Skip to content

Instantly share code, notes, and snippets.

@thevurt
Created September 18, 2012 11:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thevurt/3742748 to your computer and use it in GitHub Desktop.
Save thevurt/3742748 to your computer and use it in GitHub Desktop.
Allows click on the Facebook "OK" button once the SDK opens safari taken from https://groups.google.com/d/msg/frank-discuss/V4F6ZZB5aCk/goA3I535a8IJ
def click_fb_okay_button
%x{osascript<<APPLESCRIPT
tell application "iPhone Simulator"
activate
end tell
tell application "System Events"
tell process "iPhone Simulator"
set the position of the first window to {1, 1, 1, 1}
delay 1
click at {300, 162}
end tell
end tell
APPLESCRIPT}
end
Then /^I ok Facebook$/ do
click_fb_okay_button()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment