Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Selenium2Library/keywords/_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ def current_frame_contains(self, text, loglevel='INFO'):
"but did not" % text)
self._info("Current page contains text '%s'." % text)


def current_frame_should_not_contain(self, text, loglevel='INFO'):
"""Verifies that current frame contains `text`.

See `Page Should Contain ` for explanation about `loglevel` argument.
"""
if self._is_text_present(text):
self.log_source(loglevel)
raise AssertionError("Page should not have contained text '%s' "
"but it did" % text)
self._info("Current page should not contain text '%s'." % text)

def element_should_contain(self, locator, expected, message=''):
"""Verifies element identified by `locator` contains text `expected`.

Expand Down