This file contains 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
#!/usr/bin/env python | |
import os.path as path | |
import string | |
import argparse | |
import glob | |
import re | |
import array | |
import os |
This file contains 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
When(/^I hit the home button and reopen the app later$/) do | |
press_home_on_simulator | |
open_app_via_url | |
end | |
def open_app_via_url | |
# you have to define a scheme to start your application, let's use app-scheme:// | |
#this code creates a html page redirecting immediately to the given URL | |
html_format = "<!DOCTYPE HTML><html><head><title></title><meta http-equiv=\"refresh\" content=\"0;URL='%{LINK}'\"></head><body></body></html>" | |
html = html_format % { :LINK => 'x-yourapp://launch' } |