JaniJegoroff / facebook-ios-sdk

Simple Calabash/Sikuli example for a classic problem: Facebook login

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Motivation

This simple example provides one solution for a classic problem: automating Facebook login scenarios for iOS.

Facebook iOS SDK example application Scrumptious is used for a demo.

Problem

When automation Facebook login scenarios application context is switched from native application to a browser. Unfortunately, Calabash does not have a control in that browser window.

Solution

When working with simulators, one solution is to handle Facebook login in a browser utilising Sikuli framework: http://www.sikulix.com/.

See screencast: http://screencast.com/t/BP9IHRjQ1f

Environment

Xcode 6.1.1

Calabash 0.11.4

run_loop 1.1.1.pre3

iPhone 6 8.1 simulator

SikuliX (Build 1.1.0 2014-12-18_01:01nightly)

How to run this example

  1. Install SikuliX
  2. Set SIKULIX_HOME
  3. Download Facebook SDK for iOS and follow setup instructions
  4. Run bundle
  5. Create Sikuli Facebook login script. See example: https://github.com/JaniJegoroff/facebook-ios-sdk/tree/master/samples/Scrumptious/facebook-login.sikuli
  6. Modify Sikuli script path if needed. See https://github.com/JaniJegoroff/facebook-ios-sdk/blob/master/samples/Scrumptious/features/support/utils.rb#L2
  7. Build the project for iPhone 6 8.1 Simulator
  8. Run cucumber

About

Simple Calabash/Sikuli example for a classic problem: Facebook login

License:Apache License 2.0


Languages

Language:Objective-C 97.9%Language:Shell 1.4%Language:Python 0.5%Language:Ruby 0.1%Language:C 0.1%Language:C++ 0.0%