3
class GCalcTool(dogtail.tree.Application):
4
def clickNumeral(self, num):
5
self.button('Numeric %s'%num).click()
7
def typeNumber(self, num, base):
11
digits.insert(0, digit)
17
self.clickNumeral(digit)
20
self.button('Clear entry').click()
22
def doBinaryInfixOp(self, a, b, button):
24
self.typeNumber(a, 10)
25
self.button(button).click()
26
self.typeNumber(b, 10)
27
self.button('Calculate result').click()
30
def doSum(self, a, b):
31
return self.doBinaryInfixOp(a, b, 'Add')
33
def doProduct(self, a, b):
34
return self.doBinaryInfixOp(a, b, 'Multiply')
37
return self.child(roleName='edit bar').text