forked from qt-creator/qt-creator
Squish: Simplify selectFromCombo calls
Done-with: Christian Stenger Change-Id: Ie9b2691675b12fb4d84f9239358c7db4ab60c431 Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
This commit is contained in:
committed by
Robert Löhning
parent
6acf123c6a
commit
44e4c45e64
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user