0
votes

Ranorex is a user interface test tool for Windows. If UI elements support Microsoft Active Accessiblity (MSAA) then it can retrieve rich information about the elements, which is very useful for writing test scripts.

We have a lot of legacy code in VB6, which does not support MSAA.

I am trying to add this support to some of our VB6 UserControls as follows.

I have created an ActiveX component in C++ using ATL. This contains a helper class which implements the interface IAccessible. It also contains an initialization function which can be called from VB6.

The VB6 UserControl creates the helper object and passes its Window Handle and name to the initialization function. The helper object subclasses the window and handles the WM_GETOBJECT message, to provide the IAccessible interface for the window.

I have debugged through the code and as far as I can tell, it is working. The Ranorex Spy tool gets the IAccessible interface and calls methods on the interface.

However, Ranorex does not actually show any of the information which it appears to have fetched via this interface.

I know this is a very specific problem, but does anybody have experience of implementing IAccessible for use in Ranorex, or in other similar test tools?

I would be happy to provide my code, but I think it is too much for a normal posting.

1

1 Answers

1
votes

This doesn't ever seem to have been widely used. I have found a few breadcrumbs I can share, so perhaps these will be of some value?

First:

Microsoft Active Accessibility 2.0 ships as a standard system component in Microsoft Windows XP...

This is from the MSAA20RDK\redist.txt and it goes on to talk about how it can be installed into Win2K and earlier. As far as I can determine the pieces and parts are included in XP and later so you probably don't need the RDK download, which has basically no info at all and mostly just the DLLs.

Here's a link though:

Microsoft Active Accessibility 2.0 Redist

Something perhaps more useful, note that this is a "live" link to download the Word DOC:

Microsoft Active Accessibility 2.0

I haven't found a "page" link at MS Downloads that discusses it. This is a larger document giving many details, almost entirely for C++ programmers. There is however a little bit on VB6.

That said it tells you little except:

Visual Basic Sample Programs

The book Advanced Microsoft Visual Basic 6.0, 2nd Edition (Mandelbrot Set International, Ltd.) includes a chapter that discusses Active Accessibility. The chapter provides sample code that demonstrates how to use key Active Accessibility APIs. (Microsoft Press, ISBN 1-57231-893-7)

There is a little more there but not much. The book cited could be pretty hard to find anymore, I only saw one in Italian on Amazon but dig around and a 3rd party might sell there or on eBay, etc.

At this link: Microsoft Active Accessibility the info from that Word DOC appears to be duplicated, though perhaps it is more current.