Accessibility BUG?
Posted: Fri Sep 21, 2007 11:26 am
Hi,
I'm evaluating RanorexCore to automate acceptance tests for our application but I'm having problems with accessibility features.
What I have problem with is accessing toolbar buttons. The application uses CodeJock (http://www.codejock.com) toolbar and apparently it doesn't work with your API. The reason I'm contacting you instead of CodeJock is that I believe there may be a bug in your API because Microsoft's AccExplorer displays and handles all toolbar elements correctly.
This is the element I'm trying to access. I tried the following:
Case 1. RxElementFindChild(&mainWindow, 0, "Send/Receive", NULL, &button)
Case 2. Iterating recursively over the elements to find one whose name matches "Send/Receive". When I do the latter, the following happens for the inner "xtpBarTop" element (you can see there are two nested elements with that name) -> RxElementGetChildCount returns the right number of elements (2) but the elements have empty names:
while, according to AccExplorer, it should look like this:
Then trying to iterate over the first element (called "Standard" in the last listing) results in RxElementGetChildCount returning 7 but then RxElementGetChild for the third child element *fails*.
Could you please see what is causing this discrepancy between Microsoft's AccExplorer and your API? Thank you.
Below the code that will reproduce the bug (both cases described above). I removed all error checking code and replaced it with ASSERTs to make it more legible.
Note: You may need to change the path to the executable.
Case 1:
Case 2:
I'm testing using Windows XP Pro.
I'm evaluating RanorexCore to automate acceptance tests for our application but I'm having problems with accessibility features.
What I have problem with is accessing toolbar buttons. The application uses CodeJock (http://www.codejock.com) toolbar and apparently it doesn't work with your API. The reason I'm contacting you instead of CodeJock is that I believe there may be a bug in your API because Microsoft's AccExplorer displays and handles all toolbar elements correctly.
This is the element I'm trying to access. I tried the following:
Case 1. RxElementFindChild(&mainWindow, 0, "Send/Receive", NULL, &button)
Case 2. Iterating recursively over the elements to find one whose name matches "Send/Receive". When I do the latter, the following happens for the inner "xtpBarTop" element (you can see there are two nested elements with that name) -> RxElementGetChildCount returns the right number of elements (2) but the elements have empty names:
Code: Select all
...
[Parent = xtpBarTop]
Child =
Child =
...
Code: Select all
...
[Parent = xtpBarTop]
Child = Standard
Child = Menu Bar
...
Could you please see what is causing this discrepancy between Microsoft's AccExplorer and your API? Thank you.
Below the code that will reproduce the bug (both cases described above). I removed all error checking code and replaced it with ASSERTs to make it more legible.
Note: You may need to change the path to the executable.
Case 1:
Code: Select all
RxApplicationStart ("C:/Program Files/FollowUpXpert/FollowUpXpert.exe");
HWND hwnd = RxFormFindClassName ("Xtreeme.FollowUpXpert.3.MainWndClassName");
ASSERT (NULL != hwnd);
ElementStruct mainWindow;
ASSERT (RxControlGetElement (hwnd, &mainWindow));
ElementStruct child;
ASSERT (FALSE == RxElementFindChild (&mainWindow, 0, "Send/Receive", NULL, &child));
Code: Select all
RxApplicationStart ("C:/Program Files/FollowUpXpert/FollowUpXpert.exe");
HWND hwnd = RxFormFindClassName ("Xtreeme.FollowUpXpert.3.MainWndClassName");
ASSERT (NULL != hwnd);
ElementStruct mainWindow;
ASSERT (RxControlGetElement (hwnd, &mainWindow));
ElementStruct outerBarTop, innerBarTop;
ASSERT (RxElementFindChild (&mainWindow, 0, "xtpBarTop", NULL, &outerBarTop));
ASSERT (RxElementFindChild (&outerBarTop, 0, "xtpBarTop", NULL, &innerBarTop));
ASSERT (2 == RxElementGetChildCount (&innerBarTop));
ElementStruct standard;
ASSERT (RxElementGetChild (&innerBarTop, 0, &standard));
ASSERT (0 != strcmp (standard.Name, "Standard")); // BUG: The name should be "Standard".
ASSERT (7 == RxElementGetChildCount (&standard));
ElementStruct child;
ASSERT (RxElementGetChild (&standard, 0, &child));
ASSERT (RxElementGetChild (&standard, 1, &child));
ASSERT (FALSE == RxElementGetChild (&standard, 2, &child)); // BUG: There are 7 elements!