Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request #30 from lovelysystems/screen_should_contain_query
Browse files Browse the repository at this point in the history
Add Screen Should Contain Query
  • Loading branch information
peritus committed Feb 13, 2013
2 parents 505a025 + 803e1e5 commit d8e9131
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/IOSLibrary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,17 @@ def screen_should_contain(self, expected):
raise IOSLibraryException("No element found with mark or text %s" %
expected)

def screen_should_contain_query(self, query):
"""
Asserts that the current screen contains a given element
specified by query.
`query` Element query that should be on the current screen
"""
if not self._element_exists(query):
raise IOSLibraryException(
"No element found with query '%s'" % query)

def webview_should_contain(self, expected, index=0, query=None):
"""
Asserts that the current webview contains a given text
Expand Down

0 comments on commit d8e9131

Please sign in to comment.