Add function which check whether the field is empty

Part of: https://fedorahosted.org/freeipa/ticket/6064

Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
This commit is contained in:
Pavel Vomacka 2016-07-20 16:28:38 +02:00 committed by Martin Basti
parent 26803a0d17
commit 45825b84b0

View File

@ -1566,6 +1566,17 @@ class UI_driver(object):
s = "div[name='%s'] %s[name='%s']" % (name, element, name)
self.assert_text(s, value, parent)
def assert_empty_value(self, selector, parent=None, negative=False):
"""
Assert empty value of some field in details page or in a form
"""
value = self.get_value(selector, parent)
if negative:
assert not value == ''
else:
assert value == ''
def assert_no_dialog(self):
"""
Assert that no dialog is opened