forked from qt-creator/qt-creator
Squish: Added utility functions
Change-Id: I5ac2aabde688e86557ee364bb190e0230ba75822 Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
This commit is contained in:
committed by
Robert Löhning
parent
08f8b78f5a
commit
8480c3837b
@@ -62,3 +62,13 @@ def replaceEditorContent(editor, newcontent):
|
||||
type(editor, "<Ctrl+A>")
|
||||
type(editor, "<Delete>")
|
||||
type(editor, newcontent)
|
||||
|
||||
def typeLines(editor, lines):
|
||||
if isinstance(lines, (str, unicode)):
|
||||
lines = [lines]
|
||||
if isinstance(lines, (list, tuple)):
|
||||
for line in lines:
|
||||
type(editor, line)
|
||||
type(editor, "<Enter>")
|
||||
else:
|
||||
test.warning("Illegal parameter passed to typeLines()")
|
||||
|
||||
Reference in New Issue
Block a user