WIP: AX port and noatspi work

This commit is contained in:
Storm Dragon
2025-12-25 20:51:34 -05:00
parent 0a18de8e87
commit e134bf97d5
103 changed files with 12882 additions and 3556 deletions

View File

@@ -25,6 +25,9 @@
"""Test of accelerator labels in Java's SwingSet2."""
import gi
gi.require_version('Atspi', '2.0')
from gi.repository import Atspi
from macaroon.playback import *
import utils
@@ -34,13 +37,13 @@ sequence = MacroSequence()
# We wait for the demo to come up and for focus to be on the toggle button
#
#sequence.append(WaitForWindowActivate("SwingSet2",None))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_TOGGLE_BUTTON))
sequence.append(WaitForFocus("", acc_role=Atspi.Role.TOGGLE_BUTTON))
sequence.append(PauseAction(5000))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("F10"))
sequence.append(WaitForFocus("File", acc_role=pyatspi.ROLE_MENU))
sequence.append(WaitForFocus("File", acc_role=Atspi.Role.MENU))
sequence.append(utils.AssertPresentationAction(
"1. F10 for File menu",
["KNOWN ISSUE - Sometimes more of the hierarchy is included in the braille; other times it is not. This applies to all tests here.",
@@ -56,7 +59,7 @@ sequence.append(utils.AssertPresentationAction(
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("About", acc_role=pyatspi.ROLE_MENU_ITEM))
sequence.append(WaitForFocus("About", acc_role=Atspi.Role.MENU_ITEM))
sequence.append(utils.AssertPresentationAction(
"2. Arrow Down",
["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar About'",
@@ -82,7 +85,7 @@ sequence.append(utils.AssertPresentationAction(
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("Exit", acc_role=pyatspi.ROLE_MENU_ITEM))
sequence.append(WaitForFocus("Exit", acc_role=Atspi.Role.MENU_ITEM))
sequence.append(utils.AssertPresentationAction(
"4. Arrow Down",
["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Swing demo menu bar MenuBar Exit'",