diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2014-04-28 17:04:36 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2014-06-10 10:23:28 +0200 |
commit | bf9eeb823b5df3e581061b23ee89f3b94b0c87b3 (patch) | |
tree | 79b769a5bdd716b4c400bea5ed9cec94ae703242 /ipatests | |
parent | 74fc85d003af9376462b0610593f6ab8e8a34bf1 (diff) | |
download | freeipa-bf9eeb823b5df3e581061b23ee89f3b94b0c87b3.tar.gz freeipa-bf9eeb823b5df3e581061b23ee89f3b94b0c87b3.tar.xz freeipa-bf9eeb823b5df3e581061b23ee89f3b94b0c87b3.zip |
webui-ci: select search table item - chrome issue
Sometimes Chrome dirver has issues with clicking on items. This patch
is making it more solid. Better error reporting added for cases where
it doesn't help.
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r-- | ipatests/test_webui/ui_driver.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py index 8a8293b9b..823f82f8a 100644 --- a/ipatests/test_webui/ui_driver.py +++ b/ipatests/test_webui/ui_driver.py @@ -36,6 +36,8 @@ try: from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import InvalidElementStateException from selenium.common.exceptions import StaleElementReferenceException + from selenium.common.exceptions import WebDriverException + from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By @@ -939,7 +941,11 @@ class UI_driver(object): s = self.get_table_selector(table_name) s += " tbody td input[value='%s']+label" % pkey label = self.find(s, By.CSS_SELECTOR, parent, strict=True) - label.click() + try: + ActionChains(self.driver).move_to_element(label).click().perform() + except WebDriverException as e: + assert False, 'Can\'t click on checkbox label: %s \n%s' % (s, e) + self.wait() def get_record_value(self, pkey, column, parent=None, table_name=None): |