Skip to content

Instantly share code, notes, and snippets.

View rhgills's full-sized avatar
🤠

Robert Gilliam rhgills

🤠
View GitHub Profile
#!/usr/bin/env python
import os.path as path
import string
import argparse
import glob
import re
import array
import os
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' }