Beispiel #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))
Beispiel #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)
Beispiel #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)
 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))
 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))
Beispiel #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))
Beispiel #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)        
 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)
 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]))
 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)
Beispiel #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")
Beispiel #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)
Beispiel #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)
Beispiel #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)        
Beispiel #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")