Squish: Stabilize selectFromLocator()

Calling it several times inside the same run results in
unexpected behavior. The list of items inside the Locator
gets filled asynchronously, so give it a chance to populate
before trying to click something.

Change-Id: I542a9fda37ae09e98e496d12a40d507a040bb247
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2018-05-09 08:02:02 +02:00
parent 1ac527d8f6
commit 9c1f47399e

View File

@@ -114,6 +114,7 @@ def selectFromLocator(filter, itemName = None):
# clicking the wanted item
# if you replace this by pressing ENTER, be sure that something is selected
# otherwise you will run into unwanted behavior
snooze(1)
wantedItem = waitForObjectItem("{type='QTreeView' unnamed='1' visible='1'}", itemName)
doubleClick(wantedItem, 5, 5, 0, Qt.LeftButton)