Squish: Added utility functions

Change-Id: I5ac2aabde688e86557ee364bb190e0230ba75822
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
This commit is contained in:
Robert Loehning
2011-12-08 11:52:38 +01:00
committed by Robert Löhning
parent 08f8b78f5a
commit 8480c3837b
3 changed files with 21 additions and 2 deletions
+10
View File
@@ -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()")