Skip to content

Commit

Permalink
Fixes Page Should Contain Text should not log source on success case
Browse files Browse the repository at this point in the history
  • Loading branch information
serhatbolsu committed Aug 29, 2016
1 parent 03310b5 commit dd21d43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AppiumLibrary/keywords/_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def page_should_contain_text(self, text, loglevel='INFO'):
using the log level specified with the optional `loglevel` argument.
Giving `NONE` as level disables logging.
"""
if unicode(text) not in self.log_source(loglevel):
if not self._is_text_present(text):
self.log_source(loglevel)
raise AssertionError("Page should have contained text '%s' "
"but did not" % text)
Expand All @@ -99,7 +99,7 @@ def page_should_not_contain_text(self, text, loglevel='INFO'):
using the log level specified with the optional `loglevel` argument.
Giving `NONE` as level disables logging.
"""
if unicode(text) in self.log_source(loglevel):
if self._is_text_present(text):
self.log_source(loglevel)
raise AssertionError("Page should not have contained text '%s'" % text)
self._info("Current page does not contains text '%s'." % text)
Expand Down

0 comments on commit dd21d43

Please sign in to comment.