forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user