Description
This action moves the input focus to the given object. If the object cannot obtain the input focus, the method fails and posts an error message to the test log.
Declaration
TestObj.SetFocus()
TestObj | A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section | |||
Result | None |
Applies To
The method is applied to the following objects:
Button (MSAA Objects), CheckBox (MSAA Objects), DropDownButton (MSAA Objects) and 8 more objects, Edit (MSAA Objects), GridDropDownButton (MSAA Objects), ListItem (MSAA Objects), MenuButton (MSAA Objects), MenuItem (MSAA Objects), OutlineButton (MSAA Objects), OutlineItem (MSAA Objects), SplitButton (MSAA Objects) « Collapse the list
View Mode
To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.
Result Value
None.
Remarks
The SetFocus
method may be absent in some objects listed in the Applies To section and may be present in other objects. This depends on the implementation of the IAccessible.Select
method on a particular object.
See Also
Focused Property (MSAA Objects)
State Property (Specific to MSAA CheckBox and MSAA RadioButton Objects)