mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 08:41:55 -06:00
ui_tests: select_combobox() fixes
Move strict "search_btn" element finding to later so we do not fail when using combobox without search button. Also switch open_btn.click() before fill_textbox() as it is used to close the selection. https://pagure.io/freeipa/issue/7441 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
parent
16083eb9b5
commit
bf1f2d1c3f
@ -872,19 +872,19 @@ class UI_driver(object):
|
||||
self.wait_for_request()
|
||||
|
||||
list_cnt = self.find('.combobox-widget-list', By.CSS_SELECTOR, cb, strict=True)
|
||||
search_btn = self.find('a[name=search] i', By.CSS_SELECTOR, cb, strict=True)
|
||||
opt_s = "select[name=list] option[value='%s']" % value
|
||||
option = self.find(opt_s, By.CSS_SELECTOR, cb)
|
||||
|
||||
if combobox_input:
|
||||
if not option:
|
||||
self.fill_textbox(combobox_input, value, cb)
|
||||
open_btn.click()
|
||||
self.fill_textbox(combobox_input, value, cb)
|
||||
else:
|
||||
if not option:
|
||||
# try to search
|
||||
self.fill_textbox('filter', value, cb)
|
||||
|
||||
search_btn = self.find('a[name=search] i', By.CSS_SELECTOR, cb,
|
||||
strict=True)
|
||||
search_btn.click()
|
||||
self.wait_for_request()
|
||||
option = self.find(opt_s, By.CSS_SELECTOR, cb, strict=True)
|
||||
|
Loading…
Reference in New Issue
Block a user