Squish: Simplify selectFromCombo calls

Done-with: Christian Stenger

Change-Id: Ie9b2691675b12fb4d84f9239358c7db4ab60c431
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
This commit is contained in:
Robert Loehning
2011-12-09 15:47:52 +01:00
committed by Robert Löhning
parent 6acf123c6a
commit 44e4c45e64
3 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -54,8 +54,10 @@ def verifyEnabled(objectSpec, expectedState = True):
# param itemName is the item to be selected in the combo box
def selectFromCombo(objectSpec, itemName):
object = verifyEnabled(objectSpec)
mouseClick(object, 5, 5, 0, Qt.LeftButton)
mouseClick(waitForObjectItem(object, itemName), 5, 5, 0, Qt.LeftButton)
if itemName != str(object.currentText):
mouseClick(object, 5, 5, 0, Qt.LeftButton)
mouseClick(waitForObjectItem(object, itemName.replace(".", "\\.")), 5, 5, 0, Qt.LeftButton)
waitFor("str(object.currentText)==itemName", 5000)
def selectFromLocator(filter, itemName = None):
if itemName == None: