Squish: Ensure treeview items are accessible

Before using mouseClick() we must ensure the items are really
accessible. So, scroll the view to the respective item explicitly.

Change-Id: I9e460b9f8cd64590d8a59692ba2d726495de3d92
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2022-03-31 08:22:44 +02:00
parent 4bd71ebf6a
commit 3b5ef55a32

View File

@@ -435,6 +435,7 @@ def iterateQtVersions(keepOptionsOpen=False, alreadyOnOptionsDialog=False,
rootChildText = str(rootIndex.data()).replace(".", "\\.").replace("_", "\\_") rootChildText = str(rootIndex.data()).replace(".", "\\.").replace("_", "\\_")
for subIndex in dumpIndices(model, rootIndex): for subIndex in dumpIndices(model, rootIndex):
subChildText = str(subIndex.data()).replace(".", "\\.").replace("_", "\\_") subChildText = str(subIndex.data()).replace(".", "\\.").replace("_", "\\_")
treeView.scrollTo(subIndex)
mouseClick(waitForObjectItem(treeView, ".".join([rootChildText,subChildText]))) mouseClick(waitForObjectItem(treeView, ".".join([rootChildText,subChildText])))
currentText = str(waitForObject(":QtSupport__Internal__QtVersionManager.QLabel").text) currentText = str(waitForObject(":QtSupport__Internal__QtVersionManager.QLabel").text)
matches = pattern.match(currentText) matches = pattern.match(currentText)