示例#1
0
 def find_winwin_by_label(self, label):
     if label is not None:
         found_msg = "win Label (%s) found" % label
         hwnd = facade.get_active_window()
         winlbl = facade.get_window_text(hwnd)
         winlbl = winlbl.decode("utf-8")
         if winlbl == label:
             self.winctrl = hwnd
             raise Found(found_msg)
示例#2
0
 def describe_window(self, hwnd=None):
     if facade.has_win_implementation():
         try:
             nbr_of_children = len(facade.get_children(hwnd))
             if hwnd is None:
                 hwnd = facade.get_active_window()
             rect = facade.get_window_rect(hwnd)
             Logger.bold_header("Window Description \n   hwnd:            %d \n   Classname:       '%s' \n   Label:           '%s'\n   Nbr of children: %d\n   Position:        (%d, %d)\n   Size:            (%d, %d)" % (
                 hwnd, facade.get_classname(hwnd), facade.get_window_text(hwnd), nbr_of_children, rect[0], rect[1], rect[2], rect[3]))
             Logger.header2("Native Description")
             self.describe_children(hwnd)
         except Exception, ex:
             Logger.add_error("Native windows description failed")
示例#3
0
def get_dialog_label():
    return facade.get_window_text(facade.get_active_window()).decode("utf-8")