From 029649c05cbf9edfc80d4552dec479ab24d4872c Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Thu, 26 Jun 2014 14:38:05 +0200 Subject: webui-ci: fix action list action visibility and enablement assertion The new html structure was not addressed properly. Reviewed-By: Endi Sukma Dewata --- ipatests/test_webui/ui_driver.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py index 3f40efd5a..047009a29 100644 --- a/ipatests/test_webui/ui_driver.py +++ b/ipatests/test_webui/ui_driver.py @@ -1734,16 +1734,17 @@ class UI_driver(object): if not parent: parent = self.get_form() - s = ".facet-actions li[data-name='%s'] a" % action - link = self.find(s, By.CSS_SELECTOR, parent) + s = ".facet-actions li[data-name='%s']" % action + li = self.find(s, By.CSS_SELECTOR, parent) + link = self.find("a", By.CSS_SELECTOR, li) - is_visible = link is not None and link.is_displayed() + is_visible = li is not None and link is not None is_enabled = False assert is_visible == visible, ('Invalid visibility of action item: %s. ' 'Expected: %s') % (action, str(visible)) if is_visible: - is_enabled = not self.has_class(link, 'disabled') + is_enabled = not self.has_class(li, 'disabled') assert is_enabled == enabled, ('Invalid enabled state of action item %s. ' 'Expected: %s') % (action, str(visible)) -- cgit