Exemplo n.º 1
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")
Exemplo n.º 2
0
 def describe_menu_bar(self, menu_bar):
     Logger.newline()
     Logger.header2("Menu Bar:  count = %d" % menu_bar.MenuCount)
     for menu, name in menu_bar.Menus:
         self.describe_menu(menu, name)
Exemplo n.º 3
0
 def describe_menu_bar(self, menu_bar):
     Logger.newline()
     Logger.header2("Menu Bar:  count = %d" % menu_bar.MenuCount)
     for menu, name in menu_bar.Menus:
         self.describe_menu(menu, name)