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