Beispiel #1
0
sequence.append(KeyComboAction("<Control>b"))
sequence.append(TypeAction(" "))
sequence.append(KeyComboAction("<Control>i"))
sequence.append(TypeAction("Italic"))
sequence.append(KeyComboAction("<Control>i"))
sequence.append(TypeAction(" Normal"))

######################################################################
# 5. Enter Control-Home to position the text caret to the left of
#    the first character in the line.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Home"))
sequence.append(utils.AssertPresentationAction(
    "Control-Home to move to start of document",
    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "empty_document(.odt|)", "Bold Italic Normal \$l") + "'",
     "     VISIBLE:  'Bold Italic Normal $l', cursor=1",
     "SPEECH OUTPUT: 'Bold Italic Normal'"]))

######################################################################
# 6. Type Insert-f to get the text information for the bold word.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyPressAction(0, None, "KP_Insert"))
sequence.append(TypeAction ("f"))
sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
sequence.append(utils.AssertPresentationAction(
    "Text information for bold word",
    ["SPEECH OUTPUT: 'size 12'",
     "SPEECH OUTPUT: 'family name FreeSerif'",
     "SPEECH OUTPUT: 'bold'",
)

######################################################################
# Down Arrow to move a few rows into the table.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(
    utils.AssertPresentationAction(
        "1. Down",
        [
            "BRAILLE LINE:  'table with 7 rows 7 columns'",
            "     VISIBLE:  'table with 7 rows 7 columns', cursor=0",
            "BRAILLE LINE:  '"
            + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph")
            + "'",
            "     VISIBLE:  'Mon Paragraph', cursor=1",
            "SPEECH OUTPUT: 'table with 7 rows 7 columns'",
            "SPEECH OUTPUT: 'Mon'",
            "SPEECH OUTPUT: 'Cell B1'",
        ],
    )
)

sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(
    utils.AssertPresentationAction(
        "2. Down",
Beispiel #3
0
     "     VISIBLE:  'This is a test. \$l', cursor=16",
     "BRAILLE LINE:  'This is a test. \$l'",
     "     VISIBLE:  'This is a test. \$l', cursor=16",
     "SPEECH OUTPUT: 'This is a test.'"]))

######################################################################
# Down Arrow to move a few rows into the table.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
    "1. Down",
    ["BRAILLE LINE:  'table with 7 rows 7 columns'",
     "     VISIBLE:  'table with 7 rows 7 columns', cursor=0",
     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
     "     VISIBLE:  'Mon Paragraph', cursor=1",
     "SPEECH OUTPUT: 'table with 7 rows 7 columns'",
     "SPEECH OUTPUT: 'Mon'",
     "SPEECH OUTPUT: 'Cell B1'"]))

sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
    "2. Down",
    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Paragraph") + "'",
     "     VISIBLE:  'Paragraph', cursor=1",
     "SPEECH OUTPUT: 'blank'",
     "SPEECH OUTPUT: 'Cell B2'"]))
Beispiel #4
0
     "     VISIBLE:  'This is a test. \$l', cursor=16",
     "BRAILLE LINE:  'This is a test. \$l'",
     "     VISIBLE:  'This is a test. \$l', cursor=16",
     "SPEECH OUTPUT: 'This is a test.'"]))

######################################################################
# 4. Type a down arrow to move to the Mon table column header.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
    "Down arrow to move to the Mon table column header",
    ["BRAILLE LINE:  'table with 7 rows 7 columns'",
     "     VISIBLE:  'table with 7 rows 7 columns', cursor=0",
     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
     "     VISIBLE:  'Mon Paragraph', cursor=1",
     "SPEECH OUTPUT: 'table with 7 rows 7 columns'",
     "SPEECH OUTPUT: 'Mon'",
     "SPEECH OUTPUT: 'Cell B1'"]))

######################################################################
# 5. Type a down arrow to move to the blank table cell on the next row.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
    "Down arrow to move to the blank table cell on the next row",
    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Paragraph") + "'",
     "     VISIBLE:  'Paragraph', cursor=1",
Beispiel #5
0
#
sequence.append(KeyComboAction("Tab"))
sequence.append(KeyComboAction("Tab"))
sequence.append(TypeAction("   This is a test."))
sequence.append(KeyComboAction("Return"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))

######################################################################
# 4. Enter up arrow to position the text caret on the first line.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
    "Enter up arrow to position the text caret on the first line",
    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "empty_document(.odt|)", "		   This is a test. \$l") + "'",
     "     VISIBLE:  '		   This is a test. $l', cursor=1",
     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "empty_document(.odt|)", "		   This is a test. \$l") + "'",
     "     VISIBLE:  '		   This is a test. $l', cursor=1",
     "SPEECH OUTPUT: '		   This is a test.'"]))

######################################################################
# 5. Enter Insert-f to get text information.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyPressAction(0, None, "KP_Insert"))
sequence.append(TypeAction ("f"))
sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
sequence.append(utils.AssertPresentationAction(
    "Enter Insert-f to get text information",
    ["SPEECH OUTPUT: 'size 12'",
Beispiel #6
0
     "     VISIBLE:  'This is a test. \$l', cursor=16",
     "BRAILLE LINE:  'This is a test. \$l'",
     "     VISIBLE:  'This is a test. \$l', cursor=16",
     "SPEECH OUTPUT: 'This is a test.'"]))

######################################################################
# 5. Type a down arrow to move to the Mon table column header.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
    "Type a down arrow to move to the Mon table column header",
    ["BRAILLE LINE:  'table with 7 rows 7 columns'",
     "     VISIBLE:  'table with 7 rows 7 columns', cursor=0",
     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Sun Mon Tue Wed Thu Fri Sat") + "'",
     "     VISIBLE:  'Mon Tue Wed Thu Fri Sat', cursor=1",
     "SPEECH OUTPUT: 'table with 7 rows 7 columns'",
     "SPEECH OUTPUT: 'Sun Mon Tue Wed Thu Fri Sat'"]))

######################################################################
# 6. Enter Alt-f, Alt-c to close this Writer application.
#
sequence.append(KeyComboAction("<Alt>f"))
sequence.append(WaitForFocus("New", acc_role=pyatspi.ROLE_MENU))

sequence.append(KeyComboAction("<Alt>c"))
sequence.append(WaitAction("object:property-change:accessible-name",
                           None,
                           None,
                           pyatspi.ROLE_ROOT_PANE,
Beispiel #7
0
######################################################################
# 3. Press "w" to open the Wizards submenu.
#
sequence.append(TypeAction("w"))
sequence.append(WaitForFocus("Letter...", acc_role=pyatspi.ROLE_MENU_ITEM))

######################################################################
# 4. Press "a" to bring up the Agenda... wizard.
#
sequence.append(utils.StartRecordingAction())
sequence.append(TypeAction("a"))
sequence.append(WaitForWindowActivate("aw-5blue (read-only) - " + utils.getOOoName("Writer"), None))
sequence.append(WaitForFocus("Page design", acc_role=pyatspi.ROLE_LABEL))
sequence.append(utils.AssertPresentationAction(
    "Press 'a' to bring up the Agenda... wizard",
    ["BRAILLE LINE:  " + utils.getOOoBrailleLine("Writer") + " Frame (1 dialog)'",
     "     VISIBLE:  'Frame (1 dialog)', cursor=1",
     "BRAILLE LINE:  " + utils.getOOoBrailleLine("Writer") + " Agenda Wizard Dialog'",
     "     VISIBLE:  'Agenda Wizard Dialog', cursor=1",
     "BRAILLE LINE:  " + utils.getOOoBrailleLine("Writer") + " Agenda Wizard Dialog Agenda Wizard OptionPane Steps Panel  \$l'",
     "     VISIBLE:  ' \$l', cursor=1",
     "SPEECH OUTPUT: 'frame 1 unfocused dialog'",
     "SPEECH OUTPUT: 'Agenda Wizard'",
     "SPEECH OUTPUT: 'Steps panel'"]))

######################################################################
# 5. Press Escape to put focus back in the document.
#
sequence.append(KeyComboAction("Escape"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
Beispiel #8
0
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))

sequence.append(TypeAction("jumps over the lazy dog"))
sequence.append(KeyComboAction("Return"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))

######################################################################
# 4. Type Control-Home to position the text caret to the left of
#    the first character on the first line.
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Control>Home"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
    "Type Control-Home to move to the start of the document",
    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled 2", "The quuuiick brown fox \$l") + "'",
     "     VISIBLE:  'The quuuiick brown fox $l', cursor=1",
     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled 2", "The quuuiick brown fox \$l") + "'",
     "     VISIBLE:  'The quuuiick brown fox $l', cursor=1",
     "SPEECH OUTPUT: 'The quuuiick brown fox'"]))

######################################################################
# 5. Enter F7 to bring up the spell checking dialog.
#
language = "(English \(USA\)|\[None\])"
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("F7"))
sequence.append(WaitForFocus("Change", acc_role=pyatspi.ROLE_PUSH_BUTTON))
sequence.append(utils.AssertPresentationAction(
    "Enter F7 to bring up the spell checking dialog",
    ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled 2", "The quuuiick brown fox \$l") + "'",