diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-06-30 09:50:34 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-06-30 09:50:34 (GMT) |
commit | a172a3964db281061eeb6f2531e4b6126882d3c8 (patch) | |
tree | 2a8ab45137b10b73f3b423ebf6b2bab5820a096d /tests/shell.py | |
parent | 4bfb43c681fd8ba392e456d77adcd6291472a279 (diff) |
Start and stop all the activities on the list view
Diffstat (limited to 'tests/shell.py')
-rw-r--r-- | tests/shell.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/shell.py b/tests/shell.py index e6091e8..f216356 100644 --- a/tests/shell.py +++ b/tests/shell.py @@ -1,4 +1,5 @@ from dogtail import tree +from dogtail import predicate shell = tree.root.child(name="sugar-session", roleName="application") @@ -9,3 +10,14 @@ done_button.click() # Switch to the home list view radio_button = shell.child(name="List view", roleName="radio button") radio_button.click() + +# Start and stop all the activities in the table +table = shell.child(name="", roleName="table") +cells = table.findChildren(predicate.GenericPredicate(roleName="table cell")) + +for row in [cells[i:i+5] for i in range(0, len(cells), 5)]: + row[1].click() + + activity = tree.root.child(name="sugar-activity", roleName="application") + stop_button = activity.child(name="Stop", roleName="push button") + stop_button.click() |