My favorites
▼
|
Sign in
sugarbot
OLPC Sugar GUI automation project
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
sugarbot
/
script_calculate.py
r123
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import time
import logging
sugarActivityName = 'Calculate'
def sugarbot_main(widgets):
# Test 'selected' functionality.
assert widgets['Share with:'].selected == "Private"
widgets['Share with:'].selected = "My Neighborhood"
assert widgets['Share with:'].selected == "My Neighborhood"
# Test widget fetching/assignment
one = widgets['1']
plus = widgets['+']
enter = widgets['enter']
for i in range(0,5):
# Test click
one.click()
plus.click()
one.click()
# Test Entry text assignment
assert widgets['TextEntry'].text == '1+1'
enter.click()
assert len(widgets['TextEntry'].text) == 0
time.sleep(1)
# More Entry text assignment
widgets['TextEntry'].text = "1+5"
assert widgets['TextEntry'].text == '1+5'
enter.click()
Show details
Hide details
Change log
r101
by zachriggle on Aug 14, 2008
Diff
[No log message]
Go to:
/trunk/sugarbot/master.cfg
/trunk/sugarbot/modded-main.py
...nk/sugarbot/sbexecutionengine.py
/trunk/sugarbot/sbpython.py
/trunk/sugarbot/sbpython_script.py
/trunk/sugarbot/sbrpcserver.py
/trunk/sugarbot/script_calculate.py
/trunk/sugarbot/script_terminal.py
/trunk/sugarbot/sugarbot.py
/trunk/sugarbot/sugarbotlauncher.py
/trunk/sugarbot/test_rpcserver.py
...garbot/test_sbexecutionengine.py
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 767 bytes, 35 lines
View raw file
Powered by
Google Project Hosting