#!/usr/bin/python """Test to verify bug #450210 is still fixed. StarOffice.py needs null-check for self.getFrame(event.source). """ from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # 1. Start oowriter. # sequence.append(WaitForWindowActivate("Untitled 1 - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) ###################################################################### # 2. Enter Alt-f, to display the File menu. # sequence.append(KeyComboAction("<Alt>f")) sequence.append(WaitForFocus("New", acc_role=pyatspi.ROLE_MENU)) ###################################################################### # 3. Press "o" to open the Open File Chooser. # sequence.append(utils.StartRecordingAction()) sequence.append(TypeAction("o")) sequence.append(WaitAction("focus:", None, None,
###################################################################### # 4. Type Alt-w to bring up the Windows menu. # sequence.append(KeyComboAction("<Alt>w")) sequence.append(WaitForFocus("New Window", acc_role=pyatspi.ROLE_MENU_ITEM)) ###################################################################### # 5. Type Alt-f to select the Freeze menu item. # sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("<Alt>f")) sequence.append(WaitForFocus("Sheet Sheet1", acc_role=pyatspi.ROLE_TABLE)) sequence.append(utils.AssertPresentationAction( "Type Alt-f to select the Freeze menu item [1]", ["BRAILLE LINE: 'soffice Application fruit.ods - " + utils.getOOoName("Calc") + " Frame fruit.ods - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view4 Sheet Sheet1 Table'", " VISIBLE: 'Sheet Sheet1 Table', cursor=1", "SPEECH OUTPUT: 'Sheet Sheet1 table'"])) ###################################################################### # 6. Type Alt-w to bring up the Windows menu. # sequence.append(KeyComboAction("<Alt>w")) sequence.append(WaitForFocus("New Window", acc_role=pyatspi.ROLE_MENU_ITEM)) ###################################################################### # 7. Type Alt-f to select the Freeze menu item. # sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("<Alt>f")) sequence.append(utils.AssertPresentationAction(
pyatspi.ROLE_TABLE, 5000)) ###################################################################### # Press the down arrow to move to cell A2. # sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Down")) sequence.append(WaitAction("object:active-descendant-changed", None, None, pyatspi.ROLE_TABLE, 5000)) sequence.append(utils.AssertPresentationAction( "Down to A2 - speak cell coordinates", ["BRAILLE LINE: 'soffice Application fruit.ods - " + utils.getOOoName("Calc") + " Frame fruit.ods - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view3 Sheet Sheet1 Table Good in Pies Cell A2 '", " VISIBLE: 'Good in Pies Cell A2 ', cursor=1", "SPEECH OUTPUT: 'Good in Pies A2'"])) ###################################################################### # Press the right arrow to move to cell B2. # sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Right")) sequence.append(WaitAction("object:active-descendant-changed", None, None, pyatspi.ROLE_TABLE, 5000)) sequence.append(utils.AssertPresentationAction( "Right to B2 - speak cell coordinates",
#!/usr/bin/python """Test of Orca's presentation of Writer toolbar buttons.""" from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # Start Writer # sequence.append(WaitForWindowActivate("Untitled 1 - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) ###################################################################### # Create a new document # sequence.append(KeyComboAction("<Control>n")) sequence.append(PauseAction(3000)) ###################################################################### # Press F6 until focus is on the Standard toolbar then Right arrow # amongst the buttons. Also try to get a tooltip. # sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("F6")) sequence.append(WaitForFocus("File", acc_role=pyatspi.ROLE_MENU)) sequence.append(utils.AssertPresentationAction( "F6 to menu bar", ["BRAILLE LINE: 'soffice Application Untitled 2 - " + utils.getOOoName("Writer") + " Frame Untitled 2 - " + utils.getOOoName("Writer") + " RootPane MenuBar'",
#!/usr/bin/python """Test to verify bug #342602 is still fixed. StarOffice Writer - order of speaking information of table cells is incorrect. """ from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # 1. Start oowriter. # sequence.append(WaitForWindowActivate("Untitled 1 - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) ###################################################################### # 2. Enter Alt-f, right arrow and Return. (File->New->Text Document). # sequence.append(KeyComboAction("<Alt>f")) sequence.append(WaitForFocus("New", acc_role=pyatspi.ROLE_MENU)) sequence.append(KeyComboAction("Right")) sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM)) sequence.append(KeyComboAction("Return")) sequence.append(WaitForWindowActivate("Untitled 2 - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
#!/usr/bin/python """Test for navigating amongst table cells in Writer.""" from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # Start oowriter. There is a table_cells.params file that will # automatically load table-sample.odt # sequence.append(WaitForWindowActivate("table-sample(.odt|) - " + utils.getOOoName("Writer"), None)) ###################################################################### # Type Control-Home to move the text caret to the start of the document. # sequence.append(KeyComboAction("<Control>Home")) ###################################################################### # Type a down arrow to move to the next line. # 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 next line", ["BRAILLE LINE: 'This is a test. \$l'", " VISIBLE: 'This is a test. \$l', cursor=16", "BRAILLE LINE: 'This is a test. \$l'",
#!/usr/bin/python """Test to verify bug #364086 is still fixed. Orca reports "paragraph 0 paragraph" <char> when you begin typing in a Calc cell. """ from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # 1. Start oocalc. # sequence.append(WaitForWindowActivate("Untitled 1 - " + utils.getOOoName("Calc"), None)) ###################################################################### # 2. Enter Alt-f, right arrow, down arrow and Return. # (File->New->Spreadsheet). # sequence.append(KeyComboAction("<Alt>f")) sequence.append(WaitForFocus("New", acc_role=pyatspi.ROLE_MENU)) sequence.append(KeyComboAction("Right")) sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM)) sequence.append(KeyComboAction("Down")) sequence.append(WaitForFocus("Spreadsheet", acc_role=pyatspi.ROLE_MENU_ITEM)) sequence.append(utils.StartRecordingAction())
#!/usr/bin/python """Test to verify bug #350219 is still fixed. In OOo, no announcement when you create a new document. """ from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # 1. Start oowriter. # sequence.append(WaitForWindowActivate("Untitled 1 - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) ###################################################################### # 2. Enter Alt-f, right arrow and Return. (File->New->Text Document). # sequence.append(KeyComboAction("<Alt>f")) sequence.append(WaitForFocus("New", acc_role=pyatspi.ROLE_MENU)) sequence.append(KeyComboAction("Right")) sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM)) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Return")) sequence.append(WaitForWindowActivate("Untitled 2 - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) sequence.append(utils.AssertPresentationAction(
#!/usr/bin/python """Test to verify bug #385828 is still fixed. Can not use agenda wizard in OpenOffice.org. """ from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # 1. Start oowriter. # sequence.append(WaitForWindowActivate("Untitled 1 - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) ###################################################################### # 2. Enter Alt-f, to display the File menu. # sequence.append(KeyComboAction("<Alt>f")) sequence.append(WaitForFocus("New", acc_role=pyatspi.ROLE_MENU)) ###################################################################### # 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(PauseAction(3000)) ###################################################################### # 2. Type Control-Home to position the text caret in cell A1. # sequence.append(KeyComboAction("<Control>Home")) ###################################################################### # 3. Perform a where am I with no dynamic headers set. # sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("KP_Enter")) sequence.append(PauseAction(3000)) sequence.append(utils.AssertPresentationAction( "Basic where am I with no dynamic headers set", ["BRAILLE LINE: 'soffice Application fruit.ods - " + utils.getOOoName("Calc") + " Frame fruit.ods - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view3 Sheet Sheet1 Table Cell A1 '", " VISIBLE: 'Cell A1 ', cursor=1", "SPEECH OUTPUT: 'cell column 1 row 1 blank'"])) ###################################################################### # 4. Type Insert-r to set the dynamic column headers to the first column. # sequence.append(utils.StartRecordingAction()) sequence.append(KeyPressAction(0, None, "KP_Insert")) sequence.append(KeyComboAction("r")) sequence.append(KeyReleaseAction(0, None, "KP_Insert")) sequence.append(utils.AssertPresentationAction( "Set dynamic column headers", ["BRAILLE LINE: 'Dynamic column header set for row 1'", " VISIBLE: 'Dynamic column header set for ro', cursor=0", "SPEECH OUTPUT: 'Dynamic column header set for row 1'"]))
Note that bug #480278 was opened, because the output was being smushed. The SPEECH OUTPUT line in step #8 for this test has been adjusted to reflect the now correct output. """ from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # 1. Start oowriter. There is a bug_435226.params file that will # automatically load spanish.odt. # sequence.append(WaitForWindowActivate("spanish(.odt|) - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) ###################################################################### # 2. Type Control-Home to position the text caret to the left of the # first character on the first line. # sequence.append(KeyComboAction("<Control>Home")) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) ###################################################################### # 3. Type Control-right three times to position the text caret at the # fourth word on the first line. # sequence.append(KeyComboAction("<Control>Right")) sequence.append(KeyComboAction("<Control>Right"))
#!/usr/bin/python """Test of Orca's presentation of Writer word navigation.""" from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # Start Writer # sequence.append(WaitForWindowActivate("Untitled 1 - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) ###################################################################### # Create a new document # sequence.append(KeyComboAction("<Control>n")) sequence.append(PauseAction(3000)) ###################################################################### # Type a couple of short lines. # sequence.append(TypeAction("This is a test.")) sequence.append(KeyComboAction("Return")) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) sequence.append(TypeAction("So is this.")) sequence.append(KeyComboAction("Return")) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
#!/usr/bin/python """Test to verify bug #364765 is still fixed. Escaping out of Wizards submenu in OOo Writer causes Orca to report "Format menu". """ from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # 1. Start oowriter. # sequence.append(WaitForWindowActivate("Untitled 1 - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) ###################################################################### # 2. Enter Alt-f, to display the File menu. # sequence.append(KeyComboAction("<Alt>f")) sequence.append(WaitForFocus("New", acc_role=pyatspi.ROLE_MENU)) ###################################################################### # 3. Press W to open the Wizards submenu. # sequence.append(utils.StartRecordingAction()) sequence.append(TypeAction("w")) sequence.append(WaitForFocus("Letter...", acc_role=pyatspi.ROLE_MENU_ITEM)) sequence.append(utils.AssertPresentationAction(
#!/usr/bin/python """Test to verify bug #435852 is still fixed. Orca and OpenOffice Calc have a memory lovefest. """ from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # 1. Start oocalc. # sequence.append(WaitForWindowActivate("Untitled 1 - " + utils.getOOoName("Calc"), None)) ###################################################################### # 2. Enter Alt-f, right arrow, down arrow and Return. # (File->New->Spreadsheet). # sequence.append(KeyComboAction("<Alt>f")) sequence.append(WaitForFocus("New", acc_role=pyatspi.ROLE_MENU)) sequence.append(KeyComboAction("Right")) sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM)) sequence.append(KeyComboAction("Down")) sequence.append(WaitForFocus("Spreadsheet", acc_role=pyatspi.ROLE_MENU_ITEM)) sequence.append(KeyComboAction("Return")) sequence.append(WaitForWindowActivate("Untitled 2 - " + utils.getOOoName("Calc"), None))
# sequence.append(KeyComboAction("<Alt>f")) sequence.append(WaitForFocus("New", acc_role=pyatspi.ROLE_MENU)) sequence.append(KeyComboAction("Right")) sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM)) sequence.append(KeyComboAction("Down")) sequence.append(WaitForFocus("Spreadsheet", acc_role=pyatspi.ROLE_MENU_ITEM)) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Return")) sequence.append(WaitForFocus("Sheet Sheet1", acc_role=pyatspi.ROLE_TABLE)) sequence.append(utils.AssertPresentationAction( "File->New->Spreadsheet", ["BRAILLE LINE: 'soffice Application Untitled 2 - " + utils.getOOoName("Calc") + " Frame'", " VISIBLE: 'Untitled 2 - " + utils.getOOoName("Calc") + " (Frame|)', cursor=1", "BRAILLE LINE: 'soffice Application Untitled 2 - " + utils.getOOoName("Calc") + " Frame Untitled 2 - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view3 Sheet Sheet1 Table'", " VISIBLE: 'Sheet Sheet1 Table', cursor=1", "SPEECH OUTPUT: 'Untitled 2 - " + utils.getOOoName("Calc") + " frame'", "SPEECH OUTPUT: 'Sheet Sheet1 table'"])) ###################################################################### # 3. Type Control-Shift-t to give focus to the spreadsheet cell locator. # sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("<Shift><Control>t")) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_LIST)) sequence.append(utils.AssertPresentationAction( "Type Control-Shift-t to give focus to the spreadsheet cell locator", ["BRAILLE LINE: 'soffice Application Untitled 2 - " + utils.getOOoName("Calc") + " Frame Untitled 2 - " + utils.getOOoName("Calc") + " RootPane ToolBar A1 \$l'",
"""Test to verify bug #361747 is still fixed. Orca should use weight to determine if text is bolded in OO writer and calc. """ from macaroon.playback import * sequence = MacroSequence() import utils ###################################################################### # 1. Start oowriter. There is a bug_361747.params file that will # automatically load empty_document.odt. This uses the FreeSerif # font as the default which should be available on all test systems. # sequence.append(WaitForWindowActivate("empty_document(.odt|) - " + utils.getOOoName("Writer"), None)) sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH)) ###################################################################### # 2. Type Control-Home to move the text caret to the start of the document. # sequence.append(KeyComboAction("<Control>Home")) ###################################################################### # 3. Enter the following (without the quotation marks) to create a line # with three words on it; one bold, one italic and one in a regular font: # Control-b "Bold" Control-b Space Control-i "Italic" Control-i " Normal" # sequence.append(KeyComboAction("<Control>b")) sequence.append(TypeAction("Bold")) sequence.append(KeyComboAction("<Control>b"))
"""Test to verify bug #361624 is still fixed. Flat review sometimes fails to move to second column of text in OOo Writer documents. """ from macaroon.playback import * import utils sequence = MacroSequence() ###################################################################### # 1. Start oowriter. There is a bug_361624.params file that will # automatically load column-example.odt. # sequence.append(WaitForWindowActivate("column-example " + utils.getOOoName("Writer"), None)) ###################################################################### # 2. Type Control-Home to position the text caret to the left of the # first character on the first line. # sequence.append(KeyComboAction("<Control>Home")) ###################################################################### # 3. Type KP-8 to read the first line in flat review mode. # sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("KP_8", 3000)) sequence.append(utils.AssertPresentationAction( "Read first line in flat review mode", ["BRAILLE LINE: 'panel EFFector Vol. 19, No. 38 October Intercept Personal $l'",