orca r3441 - in trunk: . test/keystrokes/firefox



Author: shaeger
Date: Thu Jan 10 21:04:28 2008
New Revision: 3441
URL: http://svn.gnome.org/viewvc/orca?rev=3441&view=rev

Log:
Updated Dojo regression tests


Modified:
   trunk/ChangeLog
   trunk/test/keystrokes/firefox/dojo_checkbox.py
   trunk/test/keystrokes/firefox/dojo_dialog.py
   trunk/test/keystrokes/firefox/dojo_slider.py
   trunk/test/keystrokes/firefox/dojo_spinner.py
   trunk/test/keystrokes/firefox/dojo_tabcontainer.py
   trunk/test/keystrokes/firefox/dojo_tree.py

Modified: trunk/test/keystrokes/firefox/dojo_checkbox.py
==============================================================================
--- trunk/test/keystrokes/firefox/dojo_checkbox.py	(original)
+++ trunk/test/keystrokes/firefox/dojo_checkbox.py	Thu Jan 10 21:04:28 2008
@@ -22,7 +22,8 @@
 sequence.append(TypeAction(utils.DojoURLPrefix + "form/test_CheckBox.html"))
 sequence.append(KeyComboAction("Return"))
 sequence.append(WaitForDocLoad())
-sequence.append(WaitForFocus("CheckBox Widget Demo", acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+sequence.append(WaitForFocus("CheckBox Widget Demo", 
+                              acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
 
 ########################################################################
 # Give the widget a moment to construct itself
@@ -30,91 +31,98 @@
 sequence.append(PauseAction(3000))
 
 ########################################################################
-# Tab to the cb0 checkbox.  The following will be presented.
-#
-# BRAILLE LINE:  '< > CheckBox cb0: Vanilla (non-dojo) checkbox (for comparison purposes) '
-#     VISIBLE:  '< > CheckBox cb0: Vanilla (non-d', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'cb0: Vanilla (non-dojo) checkbox (for comparison purposes) check box not checked'
+# Tab to the cb0 checkbox.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("cb0: Vanilla (non-dojo) checkbox (for comparison purposes)", acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+    "Tab to the cb0 checkbox", 
+    [ "BRAILLE LINE:  '< > CheckBox cb0: Vanilla (non-dojo) checkbox (for comparison purposes)  '",
+     "     VISIBLE:  '< > CheckBox cb0: Vanilla (non-d', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'cb0: Vanilla (non-dojo) checkbox (for comparison purposes) check box not checked'"]))
 
 ########################################################################
-# Now, change its state.  The following should be presented in speech
-# and braille:
-#
-# BRAILLE LINE:  '<x> CheckBox cb0: Vanilla (non-dojo) checkbox (for comparison purposes) '
-#     VISIBLE:  '<x> CheckBox cb0: Vanilla (non-d', cursor=1
-# SPEECH OUTPUT: 'checked'
+# Now, change its state.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+    "change state on cb0 checkbox", 
+    ["BRAILLE LINE:  '<x> CheckBox cb0: Vanilla (non-dojo) checkbox (for comparison purposes)  '",
+     "     VISIBLE:  '<x> CheckBox cb0: Vanilla (non-d', cursor=1",
+     "SPEECH OUTPUT: 'checked'"]))
 
 ########################################################################
-# Tab to the cb1 checkbox.  The following will be presented.
-#
-# BRAILLE LINE:  '< > CheckBox cb1: normal checkbox, with value=foo '
-#     VISIBLE:  '< > CheckBox cb1: normal checkbo', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'cb1: normal checkbox, with value=foo check box not checked'
+# Tab to the cb1 checkbox.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("cb1: normal checkbox, with value=foo", acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+    "Tab to the cb1 checkbox", 
+    ["BRAILLE LINE:  '< > CheckBox cb1: normal checkbox, with value=foo, clicking generates console log messages  '",
+     "     VISIBLE:  '< > CheckBox cb1: normal checkbo', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'cb1: normal checkbox, with value=foo, clicking generates console log messages check box not checked'"]))
 
 ########################################################################
-# Now, change its state.  The following should be presented in speech
-# and braille:
+# Now, change its state.  
 #
-# BRAILLE LINE:  '<x> CheckBox cb1: normal checkbox, with value=foo '
-#     VISIBLE:  '<x> CheckBox cb1: normal checkbo', cursor=1
-# SPEECH OUTPUT: 'checked'
-#
-sequence.append(TypeAction("  "))
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+    "change state on cb1 checkbox", 
+    ["BRAILLE LINE:  '<x> CheckBox cb1: normal checkbox, with value=foo, clicking generates console log messages  '",
+     "     VISIBLE:  '<x> CheckBox cb1: normal checkbo', cursor=1",
+     "SPEECH OUTPUT: 'checked'"]))
 
 ########################################################################
-# Tab to the cb2 checkbox.  The following should be presented.
-#
-#BRAILLE LINE:  '<x> CheckBox cb2: normal checkbox, initially turned on. "onChange" handler updates: [true]'
-#     VISIBLE:  '<x> CheckBox cb2: normal checkbo', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'cb2: normal checkbox, initially turned on. check box checked'
+# Tab to the cb2 checkbox.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("cb2: normal checkbox, initially turned on.", acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+    "Tab to the cb2 checkbox", 
+    ["BRAILLE LINE:  '<x> CheckBox cb2: normal checkbox, initially turned on.  \"onChange\" handler updates: [true] '",
+     "     VISIBLE:  '<x> CheckBox cb2: normal checkbo', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'cb2: normal checkbox, initially turned on. check box checked'"]))
 
 ########################################################################
-# Tab to the cb5 checkbox.  Note: cb3 and cb4 are disabled.  The following should 
-# be presented.
-#
-# BRAILLE LINE:  '< > CheckBox cb5: Vanilla (non-dojo) checkbox (for comparison purposes) '
-#     VISIBLE:  '< > CheckBox cb5: Vanilla (non-d', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'cb5: Vanilla (non-dojo) checkbox (for comparison purposes) check box not checked'
+# Tab to the cb5 checkbox.  Note: cb3 and cb4 are disabled.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("cb5: Vanilla (non-dojo) checkbox (for comparison purposes)", acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+    "Tab to the cb5 checkbox", 
+    ["BRAILLE LINE:  '< > CheckBox cb5: Vanilla (non-dojo) checkbox (for comparison purposes)  '",
+     "     VISIBLE:  '< > CheckBox cb5: Vanilla (non-d', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'cb5: Vanilla (non-dojo) checkbox (for comparison purposes) check box not checked'"]))
 
 ########################################################################
-# Tab to the cb6 checkbox.  The following should be presented.
-#
-# BRAILLE LINE:  '<x> CheckBox cb6: instantiated from script '
-#     VISIBLE:  '<x> CheckBox cb6: instantiated f', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'cb6: instantiated from script check box checked'
+# Tab to the cb6 checkbox.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("cb6: instantiated from script", acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+    "Tab to the cb6 checkbox", 
+    ["BRAILLE LINE:  '<x> CheckBox cb6: instantiated from script  '",
+     "     VISIBLE:  '<x> CheckBox cb6: instantiated f', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'cb6: instantiated from script check box checked'"]))
 
 ########################################################################
-# Tab to the cb7 checkbox.  The following should be presented.
-#
-# BRAILLE LINE:  '< > CheckBox cb7: normal checkbox. disable Button enable Button set value to "fish" Button "onChange" handler updates: [false]'
-#     VISIBLE:  '< > CheckBox cb7: normal checkbo', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'cb7: normal checkbox. check box not checked'
+# Tab to the cb7 checkbox.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("cb7: normal checkbox.", acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+    "Tab to the cb7 checkbox", 
+    ["BRAILLE LINE:  '< > CheckBox cb7: normal checkbox. disable Button enable Button set value to \"fish\" Button  \"onChange\" handler updates: [false] '",
+     "     VISIBLE:  '< > CheckBox cb7: normal checkbo', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'cb7: normal checkbox. check box not checked'"]))
 
 ########################################################################
 # Do a basic "Where Am I" via KP_Enter.  The following should be
@@ -126,8 +134,15 @@
 # SPEECH OUTPUT: 'not checked'
 # SPEECH OUTPUT: ''
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "Basic Where Am I", 
+    ["BRAILLE LINE:  '< > CheckBox cb7: normal checkbox. disable Button enable Button set value to \"fish\" Button  \"onChange\" handler updates: [false] '",
+     "     VISIBLE:  '< > CheckBox cb7: normal checkbo', cursor=1",
+     "SPEECH OUTPUT: 'cb7: normal checkbox. check box not checked'",
+     "SPEECH OUTPUT: ''"]))
 
 ########################################################################
 # Close the demo

Modified: trunk/test/keystrokes/firefox/dojo_dialog.py
==============================================================================
--- trunk/test/keystrokes/firefox/dojo_dialog.py	(original)
+++ trunk/test/keystrokes/firefox/dojo_dialog.py	Thu Jan 10 21:04:28 2008
@@ -39,81 +39,89 @@
 sequence.append(PauseAction(3000))
 
 ########################################################################
-# Tab to the show dialog button.  The following will be presented.
-#
-# BRAILLE LINE:  'Show Dialog Button'
-#     VISIBLE:  'Show Dialog Button', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Show Dialog button'
+# Tab to the show dialog button.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("Show Dialog", acc_role=pyatspi.ROLE_PUSH_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+    "Tab to show dialog", 
+    ["BRAILLE LINE:  'Show Dialog    Button'",
+     "     VISIBLE:  'Show Dialog    Button', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Show Dialog    button'"]))
 
 ########################################################################
-# Launch the dialog  The following will be presented.
-#
-# BRAILLE LINE:  'First Dialog Dialog  $l'
-#     VISIBLE:  'First Dialog Dialog  $l', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'First Dialog'
+# Launch the dialog  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForFocus("First Dialog", acc_role=pyatspi.ROLE_DIALOG))
+sequence.append(utils.AssertPresentationAction(
+    "Launch first dialog", 
+    ["BRAILLE LINE:  'First Dialog Dialog  $l'",
+     "     VISIBLE:  'First Dialog Dialog  $l', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'First Dialog'"]))
 
 ########################################################################
-# Do a basic "Where Am I" via KP_Enter.  The following should be
-# presented in speech and braille:
-#
-# BRAILLE LINE:  'First Dialog Dialog  $l'
-#      VISIBLE:  'First Dialog Dialog  $l', cursor=1
-# SPEECH OUTPUT: 'First Dialog'
-# SPEECH OUTPUT: 'dialog'
+# Do a basic "Where Am I" via KP_Enter.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "Basic whereAmI", 
+    ["BRAILLE LINE:  'First Dialog Dialog  $l'",
+     "     VISIBLE:  'First Dialog Dialog  $l', cursor=1",
+     "SPEECH OUTPUT: 'First Dialog'",
+     "SPEECH OUTPUT: 'dialog'"]))
 
 ########################################################################
-# Close the dialog, focus goes back to button.  The following will be presented.
-#
-# BRAILLE LINE:  'Show Dialog Button'
-#      VISIBLE:  'Show Dialog Button', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Show Dialog button'
+# Close the dialog, focus goes back to button.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Escape"))
-sequence.append(WaitForFocus("Show Dialog", acc_role=pyatspi.ROLE_PUSH_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+    "close first dialog", 
+    ["BRAILLE LINE:  'Show Dialog    Button'",
+     "     VISIBLE:  'Show Dialog    Button', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Show Dialog    button'"]))
 
 ########################################################################
-# Tab to the second button.  The following will be presented.
-#
-# BRAILLE LINE:  'Show Tooltip Dialog Button'
-#      VISIBLE:  'Show Tooltip Dialog Button', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Show Tooltip Dialog button'
+# Tab to the second button.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("Show Tooltip Dialog", acc_role=pyatspi.ROLE_PUSH_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+    "tab to second button", 
+    ["BRAILLE LINE:  'Show Tooltip Dialog Button'",
+     "     VISIBLE:  'Show Tooltip Dialog Button', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Show Tooltip Dialog button'"]))
 
 ########################################################################
-# Launch the dialog  The following will be presented.
-#
-# BRAILLE LINE:  'User:  $l'
-#      VISIBLE:  'User:  $l', cursor=0
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Enter Login information User: Password:'
+# Launch the dialog  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForFocus("Enter Login information", acc_role=pyatspi.ROLE_DIALOG))
-
+sequence.append(utils.AssertPresentationAction(
+    "launch second dialog", 
+    ["BRAILLE LINE:  'User:  $l'",
+     "     VISIBLE:  'User:  $l', cursor=0",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Enter Login information User: Password:'"]))
+    
 ########################################################################
-# Close the dialog, focus goes back to button.  The following will be presented.
-#
-# BRAILLE LINE:  'Show Tooltip Dialog Button'
-#      VISIBLE:  'Show Tooltip Dialog Button', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Show Tooltip Dialog button'
+# Close the dialog, focus goes back to button.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Escape"))
+sequence.append(utils.AssertPresentationAction(
+    "close second dialog", 
+    ["BRAILLE LINE:  'Show Tooltip Dialog Button'",
+     "     VISIBLE:  'Show Tooltip Dialog Button', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Show Tooltip Dialog button'"]))
 
 ########################################################################
 # Close the demo

Modified: trunk/test/keystrokes/firefox/dojo_slider.py
==============================================================================
--- trunk/test/keystrokes/firefox/dojo_slider.py	(original)
+++ trunk/test/keystrokes/firefox/dojo_slider.py	Thu Jan 10 21:04:28 2008
@@ -37,8 +37,14 @@
 # SPEECH OUTPUT: ''
 # SPEECH OUTPUT: 'slider 10'
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus(acc_role=pyatspi.ROLE_SLIDER))
+sequence.append(utils.AssertPresentationAction(
+    "tab to first slider", 
+    ["BRAILLE LINE:  '10 Slider Section'",
+     "     VISIBLE:  '10 Slider Section', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'slider 10'"]))
 
 ########################################################################
 # Do a basic "Where Am I" via KP_Enter.  The following should be
@@ -54,226 +60,296 @@
 # sequence.append(PauseAction(3000))
 
 ########################################################################
-# Move the first slider.  The following will be presented for each.
-#
-#  BRAILLE LINE:  '10 Slider'
-#       VISIBLE:  '10 Slider', cursor=1
-# SPEECH OUTPUT: '10'
+# Move the first slider several times.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '10 Slider'
-#       VISIBLE:  '10 Slider', cursor=1
-# SPEECH OUTPUT: '10'                           
+sequence.append(utils.AssertPresentationAction(
+    "1 move first slider", 
+    ["BRAILLE LINE:  '10 Slider Section'",
+     "     VISIBLE:  '10 Slider Section', cursor=1",
+     "SPEECH OUTPUT: '10'"]))
+                            
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-# BRAILLE LINE:  '11 Slider'
-#      VISIBLE:  '11 Slider', cursor=1
-# SPEECH OUTPUT: '11'                           
+sequence.append(utils.AssertPresentationAction(
+    "2 move first slider", 
+    ["BRAILLE LINE:  '10 Slider Section'",
+     "     VISIBLE:  '10 Slider Section', cursor=1",
+     "SPEECH OUTPUT: '10'"]))
+                               
+sequence.append(utils.StartRecordingAction())                      
 sequence.append(KeyComboAction("Right"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
+sequence.append(utils.AssertPresentationAction(
+    "3 move first slider", 
+    ["BRAILLE LINE:  '11 Slider Section'",
+     "     VISIBLE:  '11 Slider Section', cursor=1",
+     "SPEECH OUTPUT: '11'"]))
                            
-# BRAILLE LINE:  '11 Slider'
-#      VISIBLE:  '11 Slider', cursor=1
-# SPEECH OUTPUT: '11' 
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-# BRAILLE LINE:  '11 Slider'
-#      VISIBLE:  '11 Slider', cursor=1
-# SPEECH OUTPUT: '11'                           
+sequence.append(utils.AssertPresentationAction(
+    "4 move first slider", 
+    ["BRAILLE LINE:  '11 Slider Section'",
+     "     VISIBLE:  '11 Slider Section', cursor=1",
+     "SPEECH OUTPUT: '11'"]))
+                               
+sequence.append(utils.StartRecordingAction())                  
 sequence.append(KeyComboAction("Right"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-# BRAILLE LINE:  '11 Slider'
-#      VISIBLE:  '11 Slider', cursor=1
-# SPEECH OUTPUT: '11'                             
+sequence.append(utils.AssertPresentationAction(
+    "5 move first slider", 
+    ["BRAILLE LINE:  '11 Slider Section'",
+     "     VISIBLE:  '11 Slider Section', cursor=1",
+     "SPEECH OUTPUT: '11'"]))
+                                  
+sequence.append(utils.StartRecordingAction())                    
 sequence.append(KeyComboAction("Left"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-# BRAILLE LINE:  '11 Slider'
-#      VISIBLE:  '11 Slider', cursor=1
-# SPEECH OUTPUT: '11'                             
+sequence.append(utils.AssertPresentationAction(
+    "6 move first slider", 
+    ["BRAILLE LINE:  '11 Slider Section'",
+     "     VISIBLE:  '11 Slider Section', cursor=1",
+     "SPEECH OUTPUT: '11'"]))
+                                 
+sequence.append(utils.StartRecordingAction())                     
 sequence.append(KeyComboAction("Left"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '10 Slider'
-#       VISIBLE:  '10 Slider', cursor=1
-# SPEECH OUTPUT: '10'                            
+sequence.append(utils.AssertPresentationAction(
+    "7 move first slider", 
+    ["BRAILLE LINE:  '11 Slider Section'",
+     "     VISIBLE:  '11 Slider Section', cursor=1",
+     "SPEECH OUTPUT: '11'"]))
+                                  
+sequence.append(utils.StartRecordingAction())                    
 sequence.append(KeyComboAction("Left"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '10 Slider'
-#       VISIBLE:  '10 Slider', cursor=1
-# SPEECH OUTPUT: '10'                            
+sequence.append(utils.AssertPresentationAction(
+    "8 move first slider", 
+    ["BRAILLE LINE:  '10 Slider Section'",
+     "     VISIBLE:  '10 Slider Section', cursor=1",
+     "SPEECH OUTPUT: '10'"]))
+                             
+sequence.append(utils.StartRecordingAction())                     
 sequence.append(KeyComboAction("Left"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '10 Slider'
-#       VISIBLE:  '10 Slider', cursor=1
-# SPEECH OUTPUT: '10'                           
+sequence.append(utils.AssertPresentationAction(
+    "9 move first slider", 
+    ["BRAILLE LINE:  '10 Slider Section'",
+     "     VISIBLE:  '10 Slider Section', cursor=1",
+     "SPEECH OUTPUT: '10'"]))
+                            
+sequence.append(utils.StartRecordingAction())                       
 sequence.append(KeyComboAction("Left"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
+sequence.append(utils.AssertPresentationAction(
+    "10 move first slider", 
+    ["BRAILLE LINE:  '10 Slider Section'",
+     "     VISIBLE:  '10 Slider Section', cursor=1",
+     "SPEECH OUTPUT: '10'"]))
 
 ########################################################################
-# Tab to the next entry between the sliders.  The following will be presented.
-# [[[Bug?: entry should be labelled for speech]]]
-#
-#  BRAILLE LINE:  'Slider1 Value: 10 $l '
-#       VISIBLE:  'Slider1 Value: 10 $l ', cursor=18
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'text 10'
+# Tab to the next entry between the sliders. 
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus(acc_role=pyatspi.ROLE_ENTRY))
-
+sequence.append(utils.AssertPresentationAction(
+    "move to entry", 
+    ["BRAILLE LINE:  '10.0% $l Slider1 Value: 10.0% $l  '",
+     "     VISIBLE:  '10.0% $l  ', cursor=6",
+     "BRAILLE LINE:  '10.0% $l Slider1 Value: 10.0% $l  '",
+     "     VISIBLE:  '10.0% $l  ', cursor=6",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'text 10.0%'"]))
+     
 ########################################################################
-# Tab to the next slider.  The following will be presented.
+# Tab to the button between the sliders.  
 #
-#  BRAILLE LINE:  '10 Slider'
-#       VISIBLE:  '10 Slider', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'slider 10'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
+sequence.append(utils.AssertPresentationAction(
+    "move to button", 
+    ["BRAILLE LINE:  'Disable previous slider    Button'",
+     "     VISIBLE:  'Disable previous slider    Butto', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Disable previous slider    button'"]))
+     
+########################################################################
+# Tab to the next slider.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus(acc_role=pyatspi.ROLE_SLIDER))
+sequence.append(utils.AssertPresentationAction(
+    "tab to second slider", 
+    ["BRAILLE LINE:  '10 Slider'",
+     "     VISIBLE:  '10 Slider', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'slider 10'"]))
 
 ########################################################################
-# Move the slider.  The following will be presented for each.
-#
-#  BRAILLE LINE:  '20 Slider 20 '
-#       VISIBLE:  '20 Slider 20 ', cursor=1
-# SPEECH OUTPUT: '20'
+# Move the slider several times
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '30 Slider'
-#       VISIBLE:  '30 Slider', cursor=1
-# SPEECH OUTPUT: '30'                          
+sequence.append(utils.AssertPresentationAction(
+    "1 move second slider", 
+    ["BRAILLE LINE:  '20 Slider'",
+     "     VISIBLE:  '20 Slider', cursor=1",
+     "SPEECH OUTPUT: '20'"]))
+                             
+sequence.append(utils.StartRecordingAction())                       
 sequence.append(KeyComboAction("Up"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
+sequence.append(utils.AssertPresentationAction(
+    "2 move second slider", 
+    ["BRAILLE LINE:  '30 Slider'",
+     "     VISIBLE:  '30 Slider', cursor=1",
+     "SPEECH OUTPUT: '30'"]))
                        
-#  BRAILLE LINE:  '40 Slider'
-#       VISIBLE:  '40 Slider', cursor=1
-# SPEECH OUTPUT: '40' 
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '50 Slider'
-#       VISIBLE:  '50 Slider', cursor=1
-# SPEECH OUTPUT: '50'                            
+sequence.append(utils.AssertPresentationAction(
+    "3 move second slider", 
+    ["BRAILLE LINE:  '40 Slider'",
+     "     VISIBLE:  '40 Slider', cursor=1",
+     "SPEECH OUTPUT: '40'"]))
+                               
+sequence.append(utils.StartRecordingAction())                        
 sequence.append(KeyComboAction("Up"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '60 Slider'
-#       VISIBLE:  '60 Slider', cursor=1
-# SPEECH OUTPUT: '60'                            
+sequence.append(utils.AssertPresentationAction(
+    "4 move second slider", 
+    ["BRAILLE LINE:  '50 Slider'",
+     "     VISIBLE:  '50 Slider', cursor=1",
+     "SPEECH OUTPUT: '50'"]))
+                                  
+sequence.append(utils.StartRecordingAction())                        
 sequence.append(KeyComboAction("Up"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '50 Slider'
-#       VISIBLE:  '50 Slider', cursor=1
-# SPEECH OUTPUT: '50'                            
+sequence.append(utils.AssertPresentationAction(
+    "5 move second slider", 
+    ["BRAILLE LINE:  '60 Slider'",
+     "     VISIBLE:  '60 Slider', cursor=1",
+     "SPEECH OUTPUT: '60'"]))
+                               
+sequence.append(utils.StartRecordingAction())                       
 sequence.append(KeyComboAction("Down"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '40 Slider'
-#       VISIBLE:  '40 Slider', cursor=1
-# SPEECH OUTPUT: '40'                            
+sequence.append(utils.AssertPresentationAction(
+    "6 move second slider", 
+    ["BRAILLE LINE:  '50 Slider'",
+     "     VISIBLE:  '50 Slider', cursor=1",
+     "SPEECH OUTPUT: '50'"]))
+                                  
+sequence.append(utils.StartRecordingAction())                        
 sequence.append(KeyComboAction("Down"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '30 Slider'
-#       VISIBLE:  '30 Slider', cursor=1
-# SPEECH OUTPUT: '30'                            
+sequence.append(utils.AssertPresentationAction(
+    "7 move second slider", 
+    ["BRAILLE LINE:  '40 Slider'",
+     "     VISIBLE:  '40 Slider', cursor=1",
+     "SPEECH OUTPUT: '40'"]))
+                               
+sequence.append(utils.StartRecordingAction())                        
 sequence.append(KeyComboAction("Down"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-                           
-#  BRAILLE LINE:  '20 Slider'
-#       VISIBLE:  '20 Slider', cursor=1
-# SPEECH OUTPUT: '20'                            
+sequence.append(utils.AssertPresentationAction(
+    "8 move second slider", 
+    ["BRAILLE LINE:  '30 Slider'",
+     "     VISIBLE:  '30 Slider', cursor=1",
+     "SPEECH OUTPUT: '30'"]))
+                                 
+sequence.append(utils.StartRecordingAction())                         
 sequence.append(KeyComboAction("Down"))
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_SLIDER,
                            5000))
-
+sequence.append(utils.AssertPresentationAction(
+    "9 move second slider", 
+    ["BRAILLE LINE:  '20 Slider'",
+     "     VISIBLE:  '20 Slider', cursor=1",
+     "SPEECH OUTPUT: '20'"]))
+    
 ########################################################################
 # Close the demo
 #

Modified: trunk/test/keystrokes/firefox/dojo_spinner.py
==============================================================================
--- trunk/test/keystrokes/firefox/dojo_spinner.py	(original)
+++ trunk/test/keystrokes/firefox/dojo_spinner.py	Thu Jan 10 21:04:28 2008
@@ -30,139 +30,189 @@
 sequence.append(PauseAction(3000))
 
 ########################################################################
-# Tab to the first spinner.  The following will be presented.  Note: ^ is an
-# ascii substitute for the unicode up arrow to force the script to be syntactically
-# correct. 
-#
-# BRAILLE LINE:  'Spinbox #1:  900 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  900 $l ^ Section', cursor=17
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Spinbox #1:  900 spin button'
+# Tab to the first spinner.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("Spinbox #1:", acc_role=pyatspi.ROLE_SPIN_BUTTON))
+sequence.append(utils.AssertPresentationAction(
+    "Tab to the first spinner", 
+    ["BRAILLE LINE:  'Spinbox #1:  900 $l'",
+     "     VISIBLE:  'Spinbox #1:  900 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  900 $l'",
+     "     VISIBLE:  'Spinbox #1:  900 $l', cursor=17",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Spinbox #1:  900 spin button'"]))
 
 ########################################################################
-# Use down arrow to decrement spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  899 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  899 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '899'
+# Use down arrow to decrement spinner value.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner decrement 1", 
+    ["BRAILLE LINE:  'Spinbox #1:  900 $l'",
+     "     VISIBLE:  'Spinbox #1:  900 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  899 $l'",
+     "     VISIBLE:  'Spinbox #1:  899 $l', cursor=17",
+     "SPEECH OUTPUT: '899'"]))
 
 ########################################################################
-# Use down arrow to decrement spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  898 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  898 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '898'
+# Use down arrow to decrement spinner value.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner decrement 2", 
+    [ "BRAILLE LINE:  'Spinbox #1:  899 $l'",
+     "     VISIBLE:  'Spinbox #1:  899 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  898 $l'",
+     "     VISIBLE:  'Spinbox #1:  898 $l', cursor=17",
+     "SPEECH OUTPUT: '898'"]))
 
 ########################################################################
-# Use down arrow to decrement spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  897 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  897 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '897'
+# Use down arrow to decrement spinner value.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner decrement 3", 
+    ["BRAILLE LINE:  'Spinbox #1:  898 $l'",
+     "     VISIBLE:  'Spinbox #1:  898 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  897 $l'",
+     "     VISIBLE:  'Spinbox #1:  897 $l', cursor=17",
+     "SPEECH OUTPUT: '897'"]))
 
 ########################################################################
-# Use down arrow to decrement spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  896 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  896 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '896'
+# Use down arrow to decrement spinner value. 
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner decrement 4", 
+    ["BRAILLE LINE:  'Spinbox #1:  897 $l'",
+     "     VISIBLE:  'Spinbox #1:  897 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  896 $l'",
+     "     VISIBLE:  'Spinbox #1:  896 $l', cursor=17",
+     "SPEECH OUTPUT: '896'"]))
 
 ########################################################################
-# Use down arrow to decrement spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  895 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  895 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '895'
+# Use down arrow to decrement spinner value.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner decrement 5", 
+    ["BRAILLE LINE:  'Spinbox #1:  896 $l'",
+     "     VISIBLE:  'Spinbox #1:  896 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  895 $l'",
+     "     VISIBLE:  'Spinbox #1:  895 $l', cursor=17",
+     "SPEECH OUTPUT: '895'"]))
 
 ########################################################################
-# Use up arrow to increment spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  896 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  896 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '896'
+# Use up arrow to increment spinner value. 
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner increment 1", 
+    ["BRAILLE LINE:  'Spinbox #1:  895 $l'",
+     "     VISIBLE:  'Spinbox #1:  895 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  896 $l'",
+     "     VISIBLE:  'Spinbox #1:  896 $l', cursor=17",
+     "SPEECH OUTPUT: '896'"]))
 
 ########################################################################
-# Use up arrow to increment spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  897 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  897 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '897'
+# Use up arrow to increment spinner value.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner increment 2", 
+    ["BRAILLE LINE:  'Spinbox #1:  896 $l'",
+     "     VISIBLE:  'Spinbox #1:  896 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  897 $l'",
+     "     VISIBLE:  'Spinbox #1:  897 $l', cursor=17",
+     "SPEECH OUTPUT: '897'"]))
 
 ########################################################################
-# Use up arrow to increment spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  898 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  898 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '898'
+# Use up arrow to increment spinner value.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner increment 3", 
+    ["BRAILLE LINE:  'Spinbox #1:  897 $l'",
+     "     VISIBLE:  'Spinbox #1:  897 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  898 $l'",
+     "     VISIBLE:  'Spinbox #1:  898 $l', cursor=17",
+     "SPEECH OUTPUT: '898'"]))
 
 ########################################################################
-# Use up arrow to increment spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  899 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  899 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '899'
+# Use up arrow to increment spinner value.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner increment 4", 
+    ["BRAILLE LINE:  'Spinbox #1:  898 $l'",
+     "     VISIBLE:  'Spinbox #1:  898 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  899 $l'",
+     "     VISIBLE:  'Spinbox #1:  899 $l', cursor=17",
+     "SPEECH OUTPUT: '899'"]))
 
 ########################################################################
-# Use up arrow to increment spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  900 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  900 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '900'
+# Use up arrow to increment spinner value.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner increment 5", 
+    ["BRAILLE LINE:  'Spinbox #1:  899 $l'",
+     "     VISIBLE:  'Spinbox #1:  899 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  900 $l'",
+     "     VISIBLE:  'Spinbox #1:  900 $l', cursor=17",
+     "SPEECH OUTPUT: '900'"]))
 
 ########################################################################
-# Use up arrow to increment spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  901 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  901 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '901'
+# Use up arrow to increment spinner value.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner increment 6", 
+    ["BRAILLE LINE:  'Spinbox #1:  900 $l'",
+     "     VISIBLE:  'Spinbox #1:  900 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  901 $l'",
+     "     VISIBLE:  'Spinbox #1:  901 $l', cursor=17",
+     "SPEECH OUTPUT: '901'"]))
 
 ########################################################################
-# Use up arrow to increment spinner value.  The following will be presented.
-#
-# BRAILLE LINE:  'Spinbox #1:  902 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  902 $l ^ Section', cursor=17
-# SPEECH OUTPUT: '902'
+# Use up arrow to increment spinner value.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "first spinner increment 7", 
+    ["BRAILLE LINE:  'Spinbox #1:  901 $l'",
+     "     VISIBLE:  'Spinbox #1:  901 $l', cursor=17",
+     "BRAILLE LINE:  'Spinbox #1:  902 $l'",
+     "     VISIBLE:  'Spinbox #1:  902 $l', cursor=17",
+     "SPEECH OUTPUT: '902'"]))
 
 ########################################################################
-# Do a basic "Where Am I" via KP_Enter.  The following should be
-# presented in speech and braille:
-#
-# BRAILLE LINE:  'Spinbox #1:  902 $l ^ Section'
-#      VISIBLE:  'Spinbox #1:  902 $l ^ Section', cursor=17
-# SPEECH OUTPUT: 'Spinbox #1: '
-# SPEECH OUTPUT: 'spin button'
-# SPEECH OUTPUT: '902'
-# SPEECH OUTPUT: ''
+# Do a basic "Where Am I" via KP_Enter.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "basic whereAmI", 
+    [ "BRAILLE LINE:  'Spinbox #1:  902 $l'",
+     "     VISIBLE:  'Spinbox #1:  902 $l', cursor=17",
+     "SPEECH OUTPUT: 'Spinbox #1: '",
+     "SPEECH OUTPUT: 'spin button'",
+     "SPEECH OUTPUT: '902'",
+     "SPEECH OUTPUT: ''"]))
 
 ########################################################################
 # Close the demo

Modified: trunk/test/keystrokes/firefox/dojo_tabcontainer.py
==============================================================================
--- trunk/test/keystrokes/firefox/dojo_tabcontainer.py	(original)
+++ trunk/test/keystrokes/firefox/dojo_tabcontainer.py	Thu Jan 10 21:04:28 2008
@@ -30,73 +30,89 @@
 sequence.append(PauseAction(3000))
 
 ########################################################################
-# Tab to 'Tab 2'.  The following will be presented.
-#
-# BRAILLE LINE:  'Tab 1 Tab 2 Tab 3 Another Tab Sub TabContainer'
-#      VISIBLE:  'Tab 2 Tab 3 Another Tab Sub TabC', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Tab 2 page'
+# Tab to 'Tab 2'.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("Tab 2", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.AssertPresentationAction(
+    "tab to tab 2", 
+    [ "BRAILLE LINE:  'Tab 2 Page Tab 3 Page'",
+     "     VISIBLE:  'Tab 2 Page Tab 3 Page', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Tab 2 page'"]))
 
 ########################################################################
-# Do a basic "Where Am I" via KP_Enter.  The following should be
-# presented in speech and braille:
-#
-# BRAILLE LINE:  'Tab 1 Tab 2 Tab 3 Another Tab Sub TabContainer'
-#      VISIBLE:  'Tab 2 Tab 3 Another Tab Sub TabC', cursor=1
-# SPEECH OUTPUT: 'section'
-# SPEECH OUTPUT: 'Tab 2 page'
-# SPEECH OUTPUT: 'item 1 of 1'
-# SPEECH OUTPUT: ''
+# Do a basic "Where Am I" via KP_Enter.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "basic whereAmI", 
+    ["BRAILLE LINE:  'Tab 2 Page Tab 3 Page'",
+     "     VISIBLE:  'Tab 2 Page Tab 3 Page', cursor=1",
+     "SPEECH OUTPUT: 'section'",
+     "SPEECH OUTPUT: 'Tab 2 page'",
+     "SPEECH OUTPUT: 'item 1 of 1'",
+     "SPEECH OUTPUT: ''"]))
 
 ########################################################################
 # Use arrows to move between tabs: 'Tab 3'.  The following will be presented.
 #
-# BRAILLE LINE:  'Tab 1 Tab 2 Tab 3 Another Tab Sub TabContainer'
-#      VISIBLE:  'Tab 3 Another Tab Sub TabContain', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Tab 3 page'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
-sequence.append(WaitForFocus("Tab 3", acc_role=pyatspi.ROLE_PAGE_TAB))
-
+sequence.append(utils.AssertPresentationAction(
+    "arrow to tab 3", 
+    ["BRAILLE LINE:  'Tab 3 Page Programmatically created tab Page'",
+     "     VISIBLE:  'Tab 3 Page Programmatically crea', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Tab 3 page'"]))
 ########################################################################
 # Use arrows to move between tabs: 'Another Tab'.  The following will be presented.
 #
-# BRAILLE LINE:  'Tab 1 Tab 2 Tab 3 Another Tab Sub TabContainer'
-#      VISIBLE:  'Another Tab Sub TabContainer', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Another Tab page'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
-sequence.append(WaitForFocus("Another Tab", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to programmatically created tab", 
+    ["BRAILLE LINE:  'Programmatically created tab Page Inlined Sub TabContainer Page'",
+     "     VISIBLE:  'Programmatically created tab Pag', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Programmatically created tab page'"]))
 
 ########################################################################
 # Use arrows to move between tabs: 'Sub TabContainer'.  The following will be presented.
 #
-# BRAILLE LINE:  'Tab 1 Tab 2 Tab 3 Another Tab Sub TabContainer'
-#      VISIBLE:  'Sub TabContainer', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Sub TabContainer page'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
-sequence.append(WaitForFocus("Sub TabContainer", acc_role=pyatspi.ROLE_PAGE_TAB))
-
+sequence.append(utils.AssertPresentationAction(
+    "arrow to sub tab container", 
+    ["BRAILLE LINE:  'Inlined Sub TabContainer Page Sub TabContainer from href Page'",
+     "     VISIBLE:  'Inlined Sub TabContainer Page Su', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Inlined Sub TabContainer page'"]))
 ########################################################################
 # Tab to 'SubTab2'.  The following will be presented.
 #
-# BRAILLE LINE:  'SubTab 1 SubTab 2'
-#      VISIBLE:  'SubTab 1 SubTab 2', cursor=10
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'SubTab 2 page'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
+sequence.append(utils.AssertPresentationAction(
+    "tab to tab 2 contents", 
+    ["BRAILLE LINE:  'SubTab 2 Page'",
+     "     VISIBLE:  'SubTab 2 Page', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'SubTab 2 page'"]))
+    
+########################################################################
+# Tab to next tab container
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("SubTab 2", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.AssertPresentationAction(
+    "tab to next tab container", 
+    ["BRAILLE LINE:  'Tab 1 Page  $l Tab 2 Page'",
+     "     VISIBLE:  'Tab 1 Page  $l Tab 2 Page', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Tab 1 page'"]))
 
 ########################################################################
 # Use arrows to move between tabs: 'SubTab1'.  The following will be presented
@@ -106,8 +122,14 @@
 # SPEECH OUTPUT: ''
 # SPEECH OUTPUT: 'SubTab 1 page'
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Left"))
-sequence.append(WaitForFocus("SubTab 1", acc_role=pyatspi.ROLE_PAGE_TAB))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to tab 3", 
+    ["BRAILLE LINE:  'Tab 3 Page  $l'",
+     "     VISIBLE:  'Tab 3 Page  $l', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Tab 3 page'"]))
 
 ########################################################################
 # Close the demo

Modified: trunk/test/keystrokes/firefox/dojo_tree.py
==============================================================================
--- trunk/test/keystrokes/firefox/dojo_tree.py	(original)
+++ trunk/test/keystrokes/firefox/dojo_tree.py	Thu Jan 10 21:04:28 2008
@@ -31,28 +31,46 @@
 sequence.append(PauseAction(3000))
 
 ########################################################################
-# Tab to the first tree.  The following will be presented.
-#
-# BRAILLE LINE:  'Africa ListItem LEVEL 1'
-#      VISIBLE:  'Africa ListItem LEVEL 1', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Africa list item level 1'
-# SPEECH OUTPUT: 'tree level 1'
+# Tab to the first tree.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("Africa", acc_role=pyatspi.ROLE_LIST_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "tab to continents", 
+    ["BRAILLE LINE:  'Continents ListItem'",
+     "     VISIBLE:  'Continents ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Continents list item expanded'",
+     "SPEECH OUTPUT: 'tree level 1'"]))
 
 ########################################################################
-# Do a basic "Where Am I" via KP_Enter.  The following should be
-# presented in speech and braille.  Note:  focus is never on the tree itself.
+# Arrow to Africa tree item
 #
-# BRAILLE LINE:  'Africa ListItem LEVEL 1'
-#      VISIBLE:  'Africa ListItem LEVEL 1', cursor=1
-# SPEECH OUTPUT: 'Africa'
-# SPEECH OUTPUT: 'list item'
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to Africa", 
+    ["BRAILLE LINE:  'Africa ListItem'",
+     "     VISIBLE:  'Africa ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Africa list item collapsed'",
+     "SPEECH OUTPUT: 'tree level 2'"]))
+
+########################################################################
+# Do a basic "Where Am I" via KP_Enter.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "basic whereAmI", 
+    ["BRAILLE LINE:  'Africa ListItem'",
+     "     VISIBLE:  'Africa ListItem', cursor=1",
+     "SPEECH OUTPUT: 'list item'",
+     "SPEECH OUTPUT: 'Africa'",
+     "SPEECH OUTPUT: 'item 1 of 6'",
+     "SPEECH OUTPUT: 'collapsed'",
+     "SPEECH OUTPUT: 'tree level 2'"]))
 
 ########################################################################
 ########################################################################
@@ -62,81 +80,157 @@
 # BRAILLE LINE:  'Africa expanded ListItem LEVEL 1'
 #      VISIBLE:  'Africa expanded ListItem LEVEL 1', cursor=1
 # SPEECH OUTPUT: 'expanded'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+    "expand Africa", 
+    ["BRAILLE LINE:  'Africa ListItem'",
+     "     VISIBLE:  'Africa ListItem', cursor=1",
+     "SPEECH OUTPUT: 'expanded'"]))
 
 # BRAILLE LINE:  'Egypt ListItem LEVEL 2'
 #      VISIBLE:  'Egypt ListItem LEVEL 2', cursor=1
 # SPEECH OUTPUT: ''
 # SPEECH OUTPUT: 'Egypt list item level 2'
 # SPEECH OUTPUT: 'tree level 2'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(WaitForFocus("Egypt", acc_role=pyatspi.ROLE_LIST_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to Egypt", 
+    ["BRAILLE LINE:  'Egypt ListItem'",
+     "     VISIBLE:  'Egypt ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Egypt list item'",
+     "SPEECH OUTPUT: 'tree level 3'"]))
 
 # BRAILLE LINE:  'Kenya ListItem LEVEL 2'
 #      VISIBLE:  'Kenya ListItem LEVEL 2', cursor=1
 # SPEECH OUTPUT: ''
 # SPEECH OUTPUT: 'Kenya list item level 2'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(WaitForFocus("Kenya", acc_role=pyatspi.ROLE_LIST_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to Kenya", 
+    ["BRAILLE LINE:  'Kenya ListItem'",
+     "     VISIBLE:  'Kenya ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Kenya list item collapsed'"]))
 
 # BRAILLE LINE:  'Kenya expanded ListItem LEVEL 2'
 #      VISIBLE:  'Kenya expanded ListItem LEVEL 2', cursor=1
 # SPEECH OUTPUT: 'expanded'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+    "expand Kenya", 
+    ["BRAILLE LINE:  'Kenya ListItem'",
+     "     VISIBLE:  'Kenya ListItem', cursor=1",
+     "SPEECH OUTPUT: 'expanded'"]))
 
 # BRAILLE LINE:  'Kenya collapsed ListItem LEVEL 2'
 #      VISIBLE:  'Kenya collapsed ListItem LEVEL 2', cursor=1
 # SPEECH OUTPUT: 'collapsed'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Left"))
+sequence.append(utils.AssertPresentationAction(
+    "collapse Kenya", 
+    ["BRAILLE LINE:  'Kenya ListItem'",
+     "     VISIBLE:  'Kenya ListItem', cursor=1",
+     "SPEECH OUTPUT: 'collapsed'"]))
 
 # BRAILLE LINE:  'Sudan ListItem LEVEL 2'
 #      VISIBLE:  'Sudan ListItem LEVEL 2', cursor=1
 # SPEECH OUTPUT: ''
 # SPEECH OUTPUT: 'Sudan list item level 2'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Sudan", acc_role=pyatspi.ROLE_LIST_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to Sudan", 
+    ["BRAILLE LINE:  'Sudan ListItem'",
+     "     VISIBLE:  'Sudan ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Sudan list item collapsed'"]))
 
 # BRAILLE LINE:  'Asia ListItem LEVEL 1'
 #      VISIBLE:  'Asia ListItem LEVEL 1', cursor=1
 # SPEECH OUTPUT: ''
 # SPEECH OUTPUT: 'Asia list item level 1'
 # SPEECH OUTPUT: 'tree level 1'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Asia", acc_role=pyatspi.ROLE_LIST_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to Asia", 
+    ["BRAILLE LINE:  'Asia ListItem'",
+     "     VISIBLE:  'Asia ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Asia list item collapsed'",
+     "SPEECH OUTPUT: 'tree level 2'"]))
 
 # BRAILLE LINE:  'Asia expanded ListItem LEVEL 1'
 #      VISIBLE:  'Asia expanded ListItem LEVEL 1', cursor=1
 # SPEECH OUTPUT: 'expanded'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+    "expand Asia", 
+    ["BRAILLE LINE:  'Asia ListItem'",
+     "     VISIBLE:  'Asia ListItem', cursor=1",
+     "SPEECH OUTPUT: 'expanded'"]))
 
 # BRAILLE LINE:  'China ListItem LEVEL 2'
 #      VISIBLE:  'China ListItem LEVEL 2', cursor=1
 # SPEECH OUTPUT: ''
 # SPEECH OUTPUT: 'China list item level 2'
 # SPEECH OUTPUT: 'tree level 2'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("China", acc_role=pyatspi.ROLE_LIST_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to China", 
+    ["BRAILLE LINE:  'China ListItem'",
+     "     VISIBLE:  'China ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'China list item'",
+     "SPEECH OUTPUT: 'tree level 3'"]))
 
 # BRAILLE LINE:  'India ListItem LEVEL 2'
 #      VISIBLE:  'India ListItem LEVEL 2', cursor=1
 # SPEECH OUTPUT: ''
 # SPEECH OUTPUT: 'India list item level 2'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("India", acc_role=pyatspi.ROLE_LIST_ITEM))
-
+sequence.append(utils.AssertPresentationAction(
+    "arrow to India", 
+    ["BRAILLE LINE:  'India ListItem'",
+     "     VISIBLE:  'India ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'India list item'"]))
 # BRAILLE LINE:  'Russia ListItem LEVEL 2'
 #      VISIBLE:  'Russia ListItem LEVEL 2', cursor=1
 # SPEECH OUTPUT: ''
 # SPEECH OUTPUT: 'Russia list item level 2'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Russia", acc_role=pyatspi.ROLE_LIST_ITEM))
-
+sequence.append(utils.AssertPresentationAction(
+    "arrow to Russia", 
+    ["BRAILLE LINE:  'Russia ListItem'",
+     "     VISIBLE:  'Russia ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Russia list item'"]))
 # BRAILLE LINE:  'Mongolia ListItem LEVEL 2'
 #      VISIBLE:  'Mongolia ListItem LEVEL 2', cursor=1
 # SPEECH OUTPUT: ''
 # SPEECH OUTPUT: 'Mongolia list item level 2'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Mongolia", acc_role=pyatspi.ROLE_LIST_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to Mongolia", 
+    ["BRAILLE LINE:  'Mongolia ListItem'",
+     "     VISIBLE:  'Mongolia ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Mongolia list item'"]))
+    
 ########################################################################
 # End tree navigation
 #



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]