diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-07-01 07:03:09 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-07-01 07:03:09 (GMT) |
commit | db61b9a78aca7794571fc8c525a2f5b18257ccac (patch) | |
tree | 25eba80409c803040c1ea84ca9a96a149b9364dc /tests | |
parent | 92ee9a55f60d64d23c97609454860d56b11ba5b1 (diff) |
Make the test work for all the activities
Diffstat (limited to 'tests')
-rw-r--r-- | tests/shell.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/shell.py b/tests/shell.py index 22a325c..2c9b3f5 100644 --- a/tests/shell.py +++ b/tests/shell.py @@ -30,19 +30,17 @@ activities.sort(key=attrgetter("name")) # Launch and close all the activities for activity in activities: - # FIXME these does not work properly yet - if activity.name in ["Image Viewer", "Jukebox", "Pippy"]: - continue - print "Launching %s" % activity.name activity.icon.click() - # Read displays an object chooser, let's close it - if activity.name == "Read": + # Some activities displays an object chooser, let's close it + if activity.name in ["Read", "Image Viewer", "Jukebox"]: close_button = shell.child(name="Close", roleName="push button") close_button.click() activity = tree.root.child(name="sugar-activity", roleName="application") - stop_button = activity.child(name="Stop", roleName="push button") - stop_button.click() + + pred = predicate.GenericPredicate(name="Stop", roleName="push button") + stop_buttons = activity.findChildren(pred) + stop_buttons[-1].click() |