My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
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()

Change log

r101 by zachriggle on Aug 14, 2008   Diff
[No log message]
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 767 bytes, 35 lines
Powered by Google Project Hosting