mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
WebUI tests: fix failing of tests due to unclicable label
Checkbox label is no longer clickable, most tests fail with error like this: AssertionError: Can't click on checkbox label: table.table Message: Element is not clickable at point (37, 340.3999938964844). Other element would receive the click: <input class="standalone" id="cn18" value="itest-group" name="cn" type="checkbox"> The checkbox is clickable directly without the label, this patch provides according fix. Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
parent
d1252cfb8e
commit
a3f8e8e71f
@ -933,12 +933,8 @@ class UI_driver(object):
|
||||
s = self.get_table_selector(table_name)
|
||||
input_s = s + " tbody td input[value='%s']" % pkey
|
||||
checkbox = self.find(input_s, By.CSS_SELECTOR, parent, strict=True)
|
||||
checkbox_id = checkbox.get_attribute('id')
|
||||
label_s = s + " tbody td label[for='%s']" % checkbox_id
|
||||
print(label_s)
|
||||
label = self.find(label_s, By.CSS_SELECTOR, parent, strict=True)
|
||||
try:
|
||||
ActionChains(self.driver).move_to_element(label).click().perform()
|
||||
ActionChains(self.driver).move_to_element(checkbox).click().perform()
|
||||
except WebDriverException as e:
|
||||
assert False, 'Can\'t click on checkbox label: %s \n%s' % (s, e)
|
||||
self.wait()
|
||||
|
Loading…
Reference in New Issue
Block a user