Skip to content
Closed
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
10 changes: 10 additions & 0 deletions src/Selenium2Library/keywords/tableelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,13 @@ def table_should_contain(self, table_locator, expected, loglevel='INFO'):
self.log_source(loglevel)
raise AssertionError("Table identified by '%s' should have contained text '%s'." \
% (table_locator, expected))

def table_should_not_contain(self, table_locator, not_expected, loglevel='INFO'):
"""Verifies that `expected` cant be found somewhere in the table.
`loglevel` argument.
"""
element = self._table_element_finder.find_by_content(self._current_browser(), table_locator, not_expected)

if element is not None:
self.log_source(loglevel)
raise AssertionError("Table identified by '%s' should not have contained text '%s'." % (table_locator, not_expected))