Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to trigger AccessibleEvent from unit test?(Wish to run unit test to verify screen reader support without actually running a screen reader.)
How to trigger AccessibleEvent from unit test? [message #641929] Mon, 29 November 2010 09:52 Go to next message
Peer  Törngren is currently offline Peer TörngrenFriend
Messages: 14
Registered: July 2009
Location: Sweden
Junior Member
Trying to run a unit test to verify screen reader support on my UIs.

I have a unit test that moves around the UI and listens to screen reader events, matching each event to expected text. It runs OK as long as I have a screen reader (such as JAWS) running, but I would prefer to run the unit test without this dependency.

As far as I can tell, what I need to do is to somehow force a call to org.eclipse.swt.accessibility.Accessible.get_accName(int, int). But this method is package private and not very accessible (no pun intended); callers seem to be well encapsulated deep down in native O/S code.

Is there a simple way to simulate screen reader callbacks without actually running one?
Re: How to trigger AccessibleEvent from unit test? [message #641986 is a reply to message #641929] Mon, 29 November 2010 13:12 Go to previous messageGo to next message
Tod Creasey is currently offline Tod CreaseyFriend
Messages: 59
Registered: July 2009
Member
For manual testing use inspect32 (I mention it in the article). If you work with that you are calling the windows accessibility API that SWT uses.

As far as a JUnit test the only real test is to write something that calls the windows accessibility API rather than the SWT API (as you want to test if the screen reader works). I don't know of anything like that myself.

Tod
Re: How to trigger AccessibleEvent from unit test? [message #641993 is a reply to message #641986] Mon, 29 November 2010 13:40 Go to previous message
Peer  Törngren is currently offline Peer TörngrenFriend
Messages: 14
Registered: July 2009
Location: Sweden
Junior Member
yes, I've played around with a number of tools (including insoect32), but the ones I've tried all require manual control (physical user interaction) and are external tools that cannot be (easily) launched and automated from within a test case.
Previous Topic:Table/Tree Item SWT.MeasureItem listener
Next Topic:RCP product crashes on Mac OS X 10.5.8 with JVM HotSpot 1.6.0_22 64 Bit
Goto Forum:
  


Current Time: Fri Apr 26 21:45:29 GMT 2024

Powered by FUDForum. Page generated in 0.03354 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top