[orca-list] Writing Regression Test Question



Hi,

I asked this question in IRC yesterday, but didn't get a response so
I am trying the mailing list.  So I apologize if someone is seeing
this question twice.

I am writing some Orca regression tests to get familiar with Orca's
test harness so we can use it on our Mono WinForms accessibility
project (http://www.mono-project.com/Accessibility).  However, I am
seeing some behavior that I can't quite figure out.  

I have written a little sample Gtk application to practice on and I
will attach it below.  Additionally, I have written a small portion
of a test for the sample application, here is the test:

#!/usr/bin/python
 
from macaroon.playback import *
import utils
 
sequence = MacroSequence()
 
sequence.append(utils.StartRecordingAction())
sequence.append(WaitForWindowActivate("Choose Wisely",None))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_7"))
sequence.append(utils.AssertPresentationAction(
    "Read label",
    ["BRAILLE LINE:  'You have not yet clicked a button $l'",
     "     VISIBLE:  'You have not yet clicked a butto', cursor=1",
     "SPEECH OUTPUT: 'You have not yet clicked a button'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(WaitForFocus("Button 2", acc_role=pyatspi.ROLE_PUSH_BUTTON))
sequence.append(utils.AssertPresentationAction(
    "Focus Button 2",
    ["BRAILLE LINE:  'gtktutorial.py Application Choose Wisely Frame You have not yet clicked a button Filler 
Button 2 Button'",
    "     VISIBLE:  'Button 2 Button', cursor=1",
    "BRAILLE LINE:  'gtktutorial.py Application Choose Wisely Frame You have not yet clicked a button Filler 
Button 2 Button'",
    "     VISIBLE:  'Button 2 Button', cursor=1",
    "SPEECH OUTPUT: ''",
    "SPEECH OUTPUT: 'Button 2 button'"]))

sequence.start()


Notice that the last second argument of the AssertPresentationAction
method has duplicate BRAILLE LINE and VISIBLE strings; this is the
only way the test will pass.  The strange part is that when running
Orca with orca.debug.LEVEL_INFO set, I don't see this duplication
when executing the key commands manually.  Any ideas why this would
happen?

It might also be worth noting that if I use the Tab keys or
Left/Right keys to move away from Button 2 and then come back to it,
I don't have to duplicate the BRAILLE LINE and VISIBLE strings when
I assert again.

Thanks!
Brian G. Merrell
----

Attachment: gtktutorial.py
Description: Text Data



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