Ejemplo n.º 1
0
 def _click_button(self, win):
     name = self.arg(1)
     try:
         win.click_button(name)
     except NotFoundException:
         Logger.add_error("Button(%s) not found. hwnd=%d" %
                          (name, win.hwnd))
Ejemplo n.º 2
0
 def _enter_text(self, win):
     pos = int(self.arg(1))
     text = self.arg(2)
     try:
         win.enter_text(pos, text)
     except NotFoundException:
         Logger.add_error("Text control #%d not found" % pos)
Ejemplo n.º 3
0
 def _enter_text(self, win):
     pos = int(self.arg(1))
     text = self.arg(2)
     try:
         win.enter_text(pos, text)
     except NotFoundException:
         Logger.add_error("Text control #%d not found" % pos)
Ejemplo n.º 4
0
 def _select_custom_tree_control_item(self, win):
     try:
         pos = int(self.arg(1))
         text = self.arg(2)
         win.select_custom_tree_control_item(pos, text)
     except NotFoundException:
         Logger.add_error("Custom tree control #%d item %s not found" % (pos, text))
Ejemplo n.º 5
0
 def click_mouse(self, position):
     try:
         self._send_lbutton_click_to_window(position)
         Logger.add_result("Mouse clicked at (%d, %d)" %
                           (position[0], position[1]))
     except NotFoundException:
         Logger.add_error("Mouse click failed")
 def _select_custom_tree_control_item(self, win):
     try:
         pos = int(self.arg(1))
         text = self.arg(2)
         win.select_custom_tree_control_item(pos, text)
     except NotFoundException:
         Logger.add_error("Custom tree control #%d item %s not found" %
                          (pos, text))
Ejemplo n.º 7
0
 def _select_combobox_item(self, win):
     try:
         pos = int(self.arg(1))
         text = self.arg(2)
         win.select_combobox_item(pos, text)
     except NotFoundException:
         Logger.add_error("ComboBox control #%d item %s not found" %
                          (pos, text))
Ejemplo n.º 8
0
 def _close_dialog(self, win):
     win, name = self.find_win(win, "wxDialog", self.arg(1))
     try:
         win.EndModal(wx.ID_CANCEL)
     except:
         Logger.add_error("Dialog(%s) not found" % name)        
Ejemplo n.º 9
0
 def _close_frame(self, win):
     win, name = self.find_win(win, "wxFrame", self.arg(1))
     try:
         win.Destroy()
     except NotFoundException:
         Logger.add_error("Frame(%s) not found" % name)
Ejemplo n.º 10
0
 def _clik_mouse(self, win):
     pos = self._position(win)
     try:
         win.click_mouse(pos)
     except NotFoundException:
         Logger.add_error("Mouse click at (%d, %d) failed" % (pos[0], pos[1]))
Ejemplo n.º 11
0
 def _hide_frame(self, win):
     try:
         win, name = self.find_win(win, "wxFrame", self.arg(1))
         win.Hide()
     except NotFoundException:
         Logger.add_error("Frame(%s) not found" % name)
Ejemplo n.º 12
0
 def _select_menu(self, win):
     try:
         item_id = self._find_menu_item_id(win)
         win.click_menu_item(item_id)   
     except NotFoundException:
         Logger.add_error("Menu not found")
Ejemplo n.º 13
0
 def _close_dialog(self, win):
     win, name = self.find_win(win, "wxDialog", self.arg(1))
     try:
         win.EndModal(wx.ID_CANCEL)
     except:
         Logger.add_error("Dialog(%s) not found" % name)
Ejemplo n.º 14
0
 def _hide_frame(self, win):
     try:
         win, name = self.find_win(win, "wxFrame", self.arg(1))
         win.Hide()
     except NotFoundException:
         Logger.add_error("Frame(%s) not found" % name)
Ejemplo n.º 15
0
 def _close_frame(self, win):
     win, name = self.find_win(win, "wxFrame", self.arg(1))
     try:
         win.Destroy()
     except NotFoundException:
         Logger.add_error("Frame(%s) not found" % name)        
Ejemplo n.º 16
0
 def click_mouse(self, position):
     try:
         self._send_lbutton_click_to_window(position)
         Logger.add_result("Mouse clicked at (%d, %d)" % (position[0], position[1]))
     except NotFoundException:
         Logger.add_error("Mouse click failed")