SquishTests: Rename object

to avoid strange errors when trying to use object.exists()

Change-Id: I919a7fe90e00daad2040b5e4f2c271de807aea16
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Löhning
2024-04-05 00:07:27 +02:00
parent 95df308bc3
commit 355e3ecdf8

View File

@@ -71,15 +71,15 @@ def verifyEnabled(objectSpec, expectedState = True):
# param itemName is the item to be selected in the combo box
# returns True if selection was changed or False if the wanted value was already selected
def selectFromCombo(objectSpec, itemName):
object = verifyEnabled(objectSpec)
if itemName == str(object.currentText):
comboObject = verifyEnabled(objectSpec)
if itemName == str(comboObject.currentText):
return False
else:
mouseClick(object)
mouseClick(comboObject)
snooze(1)
# params required here
mouseClick(waitForObjectItem(object, itemName.replace(".", "\\.")), 5, 5, 0, Qt.LeftButton)
test.verify(waitFor("str(object.currentText)==itemName", 5000),
mouseClick(waitForObjectItem(comboObject, itemName.replace(".", "\\.")))
test.verify(waitFor("str(comboObject.currentText)==itemName", 5000),
"Switched combo item to '%s'" % itemName)
return True