uitests: Don't fail when requiested file is not visible

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
Povilas Kanapickas 2018-09-02 01:18:49 +03:00 committed by Cole Robinson
parent 10290cbf48
commit 1f2b9b8342
1 changed files with 5 additions and 1 deletions

View File

@ -133,7 +133,11 @@ class AddHardware(uiutils.UITestCase):
browse.find("Browse Local", "push button").click()
chooser = self.app.root.find(
"Locate existing storage", "file chooser")
fname = "virt-manager.spec.in"
# use filename that is near the beginning of the file list when sorted,
# as the row in the file dialog may become scrolled out of the view and
# cause the test to fail
fname = "COPYING"
chooser.find(fname, "table cell").click()
chooser.find("Open", "push button").click()
uiutils.check_in_loop(lambda: not chooser.showing)