2
# Use GCalcTool to calculate the Fibonacci series (and check the results)
5
from dogtail.apps.wrappers.gcalctool import *
8
dogtail.utils.run('gcalctool')
9
gcalctool = GCalcTool(dogtail.tree.root.application('gcalctool'))
12
dogtail.config.config.defaultDelay = 0.3
18
gcalctool.clearEntry()
19
gcalctool.typeNumber(a, 10)
20
gcalctool.button('Add').click()
21
gcalctool.typeNumber(b, 10)
23
gcalctool.button('Calculate result').click()
25
assert int(gcalctool.getText())==(a+b)
28
b=int(gcalctool.getText())