Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The AccControl
tag uses the IAccessible interface from Microsoft Active Accessibility (MSAA). The AccControl tag has:
Name
property to define the user-accessible (friendly) name for a control.<Path>
tag to define a search path for the control in the application'sIAccessibility
tree. The<Path>
tag contains the FindWindow Tag and Next Tag.
The following XML example shows a control definition using the AccControl
tag.
<AccControl name="Control Name">
<Path>
<FindWindow>
<CaptionStartsWith>Customer App</CaptionStartsWith>
</FindWindow>
<Next/>
<Next match="2">Customer Name:</Next>
</Path>
</AccControl>
Note
Some elements in the Path
tag have a <match>
attribute that you can use to add a counter to the search description. Both the following examples return the same search result, but the first example implements the <match>
tag:
Example 1
<Caption match="2">Test Application</Caption>
Example 2
<Caption>Test Application</Caption>
<Caption>Test Application</Caption>
If <match>
isn’t specified, the default value is 0.
The String) method on an AccControl
tag is always mapped to the get_accValue
method on the subject IAccessible
node, unless the node contains role="radio button"
or role="check box"
. In these cases, the String) method returns True
or False
, depending on whether the state of the node is selected.
The String) method on an AccControl
tag is always mapped to the set_accValue
method on the subject IAccessible
node, with the exception of nodes that have role="radio button"
or role="check box"
. In the case of a radio button, an UnsupportedControlOperation
exception is raised because a radio button can’t be assigned a True
or False
value.
The following example displays the RELAX NG XML code for the <Path>
tag.
# RELAX NG XML grammar for Path
# https://relaxng.org/compact-tutorial-20030326.html
#
grammar
{
start = Path
Path = element Path
{
FindWindow* & element Next
{ attribute match { xsd:integer }?,
attribute offset { xsd:integer }?,text? }*
}
}