3
class Gedit(dogtail.tree.Application):
4
def setText(self, text):
5
buf = self.child(roleName = 'text')
9
return self.child(roleName='text').text
11
def openLocation(self, uri):
12
menuItem = self.menu("File").menuItem("Open Location...")
14
dlg = self.dialog('Open Location')
15
dlg.child(roleName = 'text').text = uri
16
dlg.button('Open').click()
18
def saveAs(self, uri):
19
menuItem = self.menu("File").menuItem("Save As...")
21
dlg = self.dialog('Save As...')
22
dlg.child(roleName = 'text').text = uri
23
dlg.button('Save').click()
25
def printPreview(self):
26
menuItem = self.menu("File").menuItem("Print Preview")