Skip to content

Instantly share code, notes, and snippets.

@prolificcoder
Created September 18, 2013 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prolificcoder/6612161 to your computer and use it in GitHub Desktop.
Save prolificcoder/6612161 to your computer and use it in GitHub Desktop.
Page object models for iOS and Android
class AndroidWorld
module RestaurantsListScreen
class << self
def restaurant(restaurant_name)
#scroll to restaurant unless its already in view
scroll_to restaurant_name unless exists {s_text restaurant_name }
s_text restaurant_name
end
end
end
end
class IosWorld
module RestaurantsListScreen
class << self
def restaurant(restaurant_name)
s_text_exact restaurant_name
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment