コード例 #1
0
 def open(self, file):
     """ file has to be in /root """
     app = self._app
     textBox = app.child(roleName="text")
     textBox.grabFocus()
     app.child("File").click()
     time.sleep(1)
     app.child("Open...").click()
     time.sleep(1)
     save_changes = [
         i
         for i in app.findChildren(self._dogtail.predicate.GenericPredicate(roleName="label"))
         if i.name.startswith("Save changes to")
     ]
     if save_changes:  # dialog poped up
         app.child(name="No", roleName="push button").click()
     time.sleep(1)
     app.child("root").click()
     DialogOpen.open(app, file)
コード例 #2
0
 def open(self, doc):
     app = self._app
     app.child('Open', 'push button').click()
     time.sleep(4)
     DialogOpen.open(app, doc)
コード例 #3
0
 def open(self, doc):
     app = self._app
     app.child('Open').click()
     time.sleep(2)
     DialogOpen.open(app, doc)