def testFocusMenuItem(self): self.runDemo('Application window') focus.window('Application Window') click.menu('File') focus.menuItem('New') self.assert_(isinstance(focus.widget.node, tree.Node)) self.assertEquals(focus.widget.node.role, pyatspi.ROLE_MENU_ITEM)
def run_ui_typing_helper(cache, text): if os.path.isfile(cache): os.remove(cache) pid = run('gedit {}'.format(cache)) gedit = tree.root.application('gedit') focus.application('gedit') focus.text() typeText(text) keyCombo('<Control>s') try: # @NOTE: maybe we can't access the menu and click the # item `Quit` at menu `File` click.menu('File') click.menuItem('Quit') except Exception as error: keyCombo('<Control>q') try: with open(cache) as fd: return fd.read() except Exception as error: os.kill(pid, signal.SIGKILL) return None
def test_custom_actions_menu(self): self.runDemo('Application window') focus.window('Application Window') click.menu('File') click.menuItem('New') self.assert_(isinstance(focus.widget.node, tree.Node)) self.assertEquals(focus.widget.node.role, pyatspi.ROLE_MENU_ITEM)
def test_custom_actions_menu(self): self.runDemo('Builder') try: wnd = self.app.child('GtkBuilder demo', roleName='frame', recursive=False, retry=False) except SearchError: wnd = self.app.child('Builder', roleName='frame', recursive=False, retry=False) focus.window(wnd.name) click.menu('File') click.menuItem('New') self.assertTrue(isinstance(focus.widget.node, tree.Node)) self.assertEqual(focus.widget.node.role, pyatspi.ROLE_MENU_ITEM)
def test_focus_menuItem(self): self.runDemo('Builder') click.menu('File') focus.menuItem('New') self.assertTrue(isinstance(focus.widget.node, tree.Node)) self.assertEqual(focus.widget.node.role, pyatspi.ROLE_MENU_ITEM)
def end_private_conversation(): click.menu('OTR') click.menuItem("End private conversation")
def start_private_conversation(): click.menu('OTR') click.menuItem("Start private conversation")