コード例 #1
0
ファイル: test4_test.py プロジェクト: askalski/mats
 def bfs(queue):
     while not len(queue) == 0:
         
         actnode = queue[0]
         print actnode.get("role")
         queue = queue[1:] 
         winutils.getAccessible2ObjectFromMSAA(actnode.os_spec[0])
         
         for child in actnode:
             queue.append(child)
コード例 #2
0
ファイル: test4_test.py プロジェクト: askalski/mats
    def test_ia2_from_msaa(self):
        
        self.assertEqual(True, self.runner.instantiate_a11y())

        tree = self.runner.controller.getAccessibleTree()

        app_handle = tree.xpath('//*[@role="application"]')
    
        self.assertEqual(len(app_handle), 1)
        app_handle = app_handle[0]
        
        print 'starting experimenting with ia2'
        
        ia2m = winutils.loadIAccessible2Module()
        
        def bfs(queue):
            while not len(queue) == 0:
                
                actnode = queue[0]
                print actnode.get("role")
                queue = queue[1:] 
                winutils.getAccessible2ObjectFromMSAA(actnode.os_spec[0])
                
                for child in actnode:
                    queue.append(child)
        
        bfs([app_handle])
        
        
        ifs = winutils.getAccessible2ObjectFromMSAA(app_handle.os_spec[0])
        
        print ifs
        
        pyshell.runShellHere({'ifs': ifs, 'ia2m' : ia2m})
        #ia2object = winutils.getAccessible2ObjectFromMSAA(app_handle.os_spec[0])
        
        #self.runner.wait_for_stop()
        
        pass