UIAProCheckBox Object
This object is supported as a technical preview.
Description
A checkbox object in an application that supports UIA Pro.
IMPORTANT
The UIAProCheckBox represents controls with Control Type UIA_CheckBoxControlTypeId = 50002
Operations
The sections below list the built-in methods and properties that you can use as operations for the UIAProCheckBox object.
Note: You can also view a list and descriptions of the UIAProCheckBox description properties, for use in object repository descriptions, programmatic descriptions, checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.
Common methods and properties
Common Methods
Activate | Double-clicks the object to activate it. |
CaptureBitmap | Saves a screen capture of the object as a .png or .bmp image, depending on the specified file extension. |
Check | Checks whether the actual value of an item matches the expected value. |
CheckProperty | Checks whether the specified object property achieves the specified value within the specified timeout. |
ChildObjects | Returns the collection of child objects contained within the object. |
Click | Clicks the object. |
GetAllROProperties | Returns the collection of properties and current values from the object in the application. |
GetROProperty | Returns the current value of the specified description property from the object in the application. |
GetSupportedPatterns | Returns an array that contains the patterns supported by the current UI Automation object. |
GetTOProperties | Returns the collection of properties and values used to identify the object. |
GetTOProperty | Returns the value of the specified description property from the test object description. |
Highlight | Highlights the object in the application. |
Output | Retrieves the current value of an item and stores it in a specified location. |
RefreshObject | Instructs UFT One to re-identify the object in the application the next time a step refers to this object. |
SetTOProperty | Sets the value of the specified description property in the test object description. |
ToString | Returns a string that represents the current test object. |
Type | Simulates keyboard input on the object. |
WaitProperty | Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step. |
Common Property
Exist | Checks whether the object currently exists in the open application. |
HasSupportedPattern | Indicates whether the current UI Automation object supports a specific automation pattern. |
HasSupportedPatterns | Indicates whether the current UI Automation object supports all automation patterns. |
UIAPro Pattern-Based methods and properties
ExpandCollapse pattern
Method/Property | Description |
---|---|
Collapse | Hides all child nodes, controls, or content of the element. |
Expand | Displays all child nodes, controls, or content of the element. |
GetExpandCollapseState | Gets the Expand or Collapse state of the element. |
Grid pattern
Method | Description |
---|---|
ActivateCell | Activates (double-clicks) the specified cell in the grid. |
AddCellToSelection | Selects a cell in addition to previously selected cells. |
AddRowToSelection | Selects a row in addition to previously selected rows. |
ClickCell | Clicks the specified cell in the grid. |
GetCell | Retrieves a UI Automation object representing an item in the grid. |
GetCellName | Returns the value of the name property for the specified cell. |
GetCellText | Returns the text provided by the cell’s Text pattern. |
GetCellValue | Returns the value provided by the cell's Value pattern. |
GetColumnCount | Retrieves the number of columns in the grid. |
GetRowCount | Retrieves the number of rows in the grid. |
SelectCell | Selects a cell in the grid. |
SelectRow | Selects a row in the grid. |
SetCellValue | Sets the specified cell’s value using the Value pattern. |
GridItem pattern
Method | Description |
---|---|
GetColumnIndex | Retrieves the zero-based index of the column that contains the grid item. |
GetContainingGrid | Retrieves a UI Automation object that supports Grid pattern and represents the container of the cell or item. |
GetRowIndex | Retrieves the zero-based index of the row that contains the grid item. |
GetSpannedColumns | Retrieves the number of columns spanned by a cell or item. |
GetSpannedRows | Retrieves the number of rows spanned by a cell or item. |
Invoke pattern
Method | Description |
---|---|
Invoke | Invokes the action of a control, such as a button click. |
LegacyIAccessible pattern
Method | Description |
---|---|
GetChildId | Retrieves the Microsoft Active Accessibility child identifier for the current object. |
GetDefaultOperation | Retrieves the Microsoft Active Accessibility default operation for the current object. |
GetDescription | Retrieves the Microsoft Active Accessibility description for the current object. |
GetHelp | Retrieves the Microsoft Active Accessibility help string for the current object. |
GetKeyboardShortcut | Retrieves the Microsoft Active Accessibility keyboard shortcut for the current object. |
GetName | Retrieves the Microsoft Active Accessibility name for the current object. |
GetRole | Retrieves the Microsoft Active Accessibility role for the current object. |
GetSelectedChildren | Retrieves the Microsoft Active Accessibility selected children of the current object. |
GetState | Retrieves the Microsoft Active Accessibility state for the current object. |
GetValue | Retrieves the Microsoft Active Accessibility value for the current object. |
Select | Selects the element. |
SetSecure | Sets the encrypted Microsoft Active Accessibility value for the current object. |
SetValue | Sets the Microsoft Active Accessibility value for the current object. |
PerformDefaultOperation | Performs the default operation on the control. |
RangeValue pattern
Method/Property | Description |
---|---|
GetLargeChange | Gets the control-specific large-change value that is added to or subtracted from the Value of the current UI Automation object. |
GetMaximum | Gets the maximum value supported by the UI Automation object. |
GetMinimum | Gets the minimum value supported by the UI Automation object. |
GetSmallChange | Gets the control-specific small-change value that is added to or subtracted from the Value of the current UI Automation object. |
GetValue | Gets the current value of the UI Automation object. |
IsReadOnly | Indicates whether the value of a UI Automation object is read-only. |
SetValue | Sets the current value of the UI Automation object. |
Scroll pattern
Method/Property | Description |
---|---|
CanScrollHorizontally | Indicates whether the UI Automation element can scroll horizontally. |
CanScrollVertically | Indicates whether the UI Automation element can scroll vertically. |
GetHorizontalScrollPercent | Gets the current horizontal scroll position. |
GetHorizontalViewSize | Gets the current horizontal view size. |
GetVerticalScrollPercent | Gets the current vertical scroll position. |
GetVerticalViewSize | Gets the current vertical view size. |
Scroll | Scrolls the visible region of the content area horizontally and vertically. |
ScrollHorizontal | Scrolls the visible region of the content area horizontally. |
ScrollVertical | Scrolls the visible region of the content area vertically. |
SetHorizontalScrollPercent | Sets the horizontal scroll position as a percentage of the total content area within the automation element. |
SetScrollPercent | Sets the horizontal and vertical scroll position as a percentage of the total content area within the automation element. |
SetVerticalScrollPercent | Sets the vertical scroll position as a percentage of the total content area within the automation element. |
ScrollItem pattern
Method/Property | Description |
---|---|
ScrollIntoView | Scrolls an item in a scrollable view into view. |
Selection pattern
Method/Property | Description |
---|---|
CanSelectMultipleItems | Indicates whether multiple items in the container can be selected at once. |
IsSelectionRequired | Gets a value that specifies whether the container requires at least one child item to be selected. |
GetSelectedChildren | Retrieves all selected items from the container. |
SelectionItem pattern
Method/Property | Description |
---|---|
AddToSelection | Selects the item in addition to the previously selected items. |
IsSelected | Indicates whether the item is selected. |
RemoveFromSelection | Deselects the current item. |
Select | Deselects any selected items and then selects the current item. |
Table pattern
Method | Description |
---|---|
GetColumnHeaders | Retrieves a collection of UI Automation objects representing all the column headers in a table. |
GetPrimaryTraversalDirection | Retrieves the primary direction of traversal for the table. |
GetRowHeaders | Retrieves a collection of UI Automation objects representing all the row headers in a table. |
TableItem pattern
Method | Description |
---|---|
GetColumnHeaderItems | Retrieves the column headers associated with a table item or cell. |
GetRowHeaderItems | Retrieves the row headers associated with a table item or cell. |
Text pattern
Method | Description |
---|---|
(UFT One versions 2021 R1 and later) | Clears any text selections in the object. |
(UFT One versions 2021 R1 and later) | Returns the object's selected text, or an empty string if no text is selected. |
GetSupportedSelectionMode | Indicates the type of text selection that is supported by the control. |
GetText | Retrieves the text of the object. |
(UFT One versions 2021 R1 and later) | Returns all visible text from the object. |
(UFT One versions 2021 R1 and later) | Scrolls a text control to bring the specified area into view. |
(UFT One versions 2021 R1 and later) | Selects the specified text in the object. |
(UFT One versions 2021 R1 and later) | Selects all of the object’s text. |
Toggle pattern
Method | Description |
---|---|
GetToggleState | Provides access to the property values of a Toggle Pattern object using its Current or Cached accessors. |
Toggle | Cycles through the toggle states of the control. |
Value pattern
Method/Property | Description |
---|---|
GetValue | Retrieves the value of the UI Automation element. |
IsReadOnly | Indicates whether the value of the control is read-only. |
SetSecure | Sets the encrypted value of the UI Automation element. |
SetValue | Sets the value of the UI Automation element. |
Window pattern
Method/Property | Description |
---|---|
CanMaximize | Indicates whether the window can be maximized. |
CanMinimize | Indicates whether the window can be minimized. |
Close | Closes the window. |
GetWindowInteractionState | Retrieves the interaction state of the window. |
GetWindowVisualState | Retrieves the visual state of the window. |
IsMaximized | Indicates whether the window is maximized. |
IsMinimized | Indicates whether the window is minimized. |
IsModal | Indicates whether the window is modal. |
IsTopMost | Indicates whether the window is a top-level object. |
Maximize | Enlarges the window to full screen size. |
Reduces the window to an icon. | |
Restore | Restores the window to its previous size. |
WaitForInputIdle | Waits until the window is ready for input or the timeout expires. |
Activate Method
Description
Double-clicks the object to activate it.
Syntax
object.Activate [x],[y]
Arguments
Parameter | Description |
---|---|
x | Optional. A long integer value. The x-coordinate of the object to click. |
y | Optional. A long integer value. The y-coordinate of the object to click. |
Return Type
None
Click Method
Description
Clicks the object.
Syntax
object.Click [x],[y], [button]
Arguments
Parameter | Description |
---|---|
x | Optional. A long integer value. The x-coordinate of the object to click. |
y | Optional. A long integer value. The y-coordinate of the object to click. |
button | Optional. A predefined constant or number. The mouse button used to perform the click. |
Return Type
None
Example
'The following example clicks different objects.
UIAProWindow("Telerik UI for WinForms").UIAProObject("radRibbonBar1").UIAProButton("Button").Click wait 1 UIAProWindow("Telerik UI for WinForms").UIAProObject("radRibbonBar1").Click 150, 40, 1 Wait 1 UIAProWindow("Telerik UI for WinForms").UIAProObject("radRibbonBar1").Click 150, 40, "L" wait 1
'The following example clicks on a list item added to a UIAObject.
UIAProWindow("Telerik UI for WinForms").UIAProList("radCheckedListBox1").UIAProObject("<html><span style='font-size:1").Click
GetSupportedPatterns Method
Description
Returns an array that contains the patterns supported by the current UI Automation object.
Syntax
object.GetSupportedPatterns
Return Type
An array
HasSupportedPattern Property
Description
Indicates whether the current UI Automation object supports a specific automation pattern.
Syntax
object.HasSupportedPattern(string patternName)
Arguments
Parameter | Description |
---|---|
PatternName | An automation pattern. |
Return Type
A value of Boolean type.
HasSupportedPatterns Property
Description
Indicates whether the current UI Automation object supports all automation patterns.
Syntax
object.HasSupportedPatterns(string patternName)
Arguments
Parameter | Description |
---|---|
PatternName | Automation patterns. |
Return Type
A value of Boolean type.
Type Method
Description
Simulates keyboard input on the object.
Syntax
object.Type string
Arguments
Parameter | Description |
---|---|
string | Required. A string. The characters to enter in the object. |
Return Type
None
ActivateCell Method
Description
Activates (double-clicks) the specified cell in the grid.
Syntax
object.GridPattern.ActivateCell rowIndex, columnIndex, [x, y]
Arguments
Parameter | Description |
---|---|
rowIndex | Required. An integer. The cell row index. |
columnIndex | Required. An integer. The cell column index. |
x | Optional. An integer. The x-coordinate of the location to click within the cell. |
y | Optional. An integer. The y-coordinate of the location to click within the cell. |
Return Type
None
IMPORTANT
This method is available only if you implement the Grid pattern in an object in your application.
AddCellToSelection Method
Description
Selects a cell in addition to previously selected cells.
Syntax
object.GridPattern.AddCellToSelection rowIndex, columnIndex
Arguments
Parameter | Description |
---|---|
rowIndex | Required. An integer. The cell row index. |
columnIndex | Required. An integer. The cell column index. |
Return Type
None
IMPORTANT
This method is available only if you implement the Grid pattern in an object in your application.
AddRowToSelection Method
Description
Selects a row in addition to previously selected rows.
Syntax
object.GridPattern.AddRowToSelection rowIndex
Arguments
Parameter | Description |
---|---|
rowIndex | Required. An integer. The row to select. |
Return Type
None
IMPORTANT
This method is available only if you implement the Grid pattern in an object in your application.
AddToSelection Method
Description
Selects the item in addition to the previously selected items.
Syntax
object.SelectionItemPattern.AddToSelection
Return Type
None
IMPORTANT
This method is available only if you implement the SelectionItem pattern in an object in your application.
CanMaximize Property
Description
Indicates whether the window can be maximized.
Syntax
object.WindowPattern.CanMaximize
Return Type
A value of Boolean type.
IMPORTANT
This method is available only if you implement the Window pattern in an object in your application.
CanMinimize Property
Description
Indicates whether the window can be minimized.
Syntax
object.WindowPattern.CanMinimize
Return Type
A value of Boolean type.
IMPORTANT
This method is available only if you implement the Window pattern in an object in your application.
CanScrollHorizontally Property
Description
Indicates whether the UI Automation element can scroll horizontally.
Syntax
object.ScrollPattern.CanScrollHorizontally
Return Type
A value of Boolean type.
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
CanScrollVertically Property
Description
Indicates whether the UI Automation element can scroll vertically.
Syntax
object.ScrollPattern.CanScrollVertically
Return Type
A value of Boolean type.
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
CanSelectMultipleItems Property
Description
Indicates whether multiple items in the container can be selected at once.
Syntax
object.SelectionPattern.CanSelectMultipleItems
Return Type
A value of Boolean type.
IMPORTANT
This method is available only if you implement the Selection pattern in an object in your application.
ClearSelection Method
Supported on UFT One versions 2021 R1 and later.
Description
Clears any text selections in the object.
Syntax
object.TextPattern.ClearSelection
Return Type
None
IMPORTANT
This method is available only if you implement the Text pattern in an object in your application.
ClickCell Method
Description
Clicks the specified cell in the grid.
Syntax
object.GridPattern.ClickCell rowIndex,columnIndex, [x], [y], [button]
Arguments
Parameter | Description |
---|---|
rowIndex | Required. An integer. The cell row index. |
columnIndex | Required. An integer. The cell column index |
x | Optional. An integer. The x-coordinate of the location to click within the cell. Default = The center of the axis. |
y | Optional. An integer. The y-coordinate of the location to click within the cell. Default = The center of the axis. |
button | Optional. The mouse button used to perform the cell click. Possible values:
UFT One 2021 and 2021 R1: 1 = Middle button, 2 = Right button. |
Return Type
None
IMPORTANT
This method is available only if you implement the Grid pattern in an object in your application.
Close Method
Description
Closes the window.
Syntax
object.WindowPattern.Close
Return Type
None
IMPORTANT
This method is available only if you implement the Window pattern in an object in your application.
Collapse Method
Description
Hides all child nodes, controls, or content of the element.
Syntax
object.ExpandCollapsePattern.Collapse
Return Type
None
IMPORTANT
This method is available only if you implement the ExpandCollapse pattern in an object in your application.
Expand Method
Description
Displays all child nodes, controls, or content of the element.
Syntax
object.ExpandCollapsePattern.Expand
Return Type
None
IMPORTANT
This method is available only if you implement the ExpandCollapse pattern in your application.
GetCell Method
Description
Retrieves a UI Automation object representing an item in the grid.
Syntax
object.GridPattern.GetCell(int rowIndex, int columnIndex)
Arguments
Parameter | Description |
---|---|
rowIndex | Required. An integer. The cell row index. |
columnIndex | Required. An integer. The cell column index. |
Return Type
A UI Automation object.
IMPORTANT
This method is available only if you implement the Grid pattern in your application.
GetCellName Method
Description
Returns the value of the name property for the specified cell.
Syntax
object.GridPattern.GetCellName rowIndex, columnIndex
Arguments
Parameter | Description |
---|---|
rowIndex | Required. An integer value. The cell row index. |
columnIndex | Required. An integer value. The cell column index. |
Return Type
The value of the name property for the specified cell.
IMPORTANT
This method is available only if you implement the Grid pattern in your application.
GetCellValue Method
Description
Returns the value provided by the cell's value pattern.
Syntax
object.GridPattern.GetCellValue rowIndex, columnIndex
Arguments
Parameter | Description |
---|---|
rowIndex | Required. An integer value. The cell row index. |
columnIndex | Required. An integer value. The cell column index. |
Return Type
The value of the value property for the specified cell.
IMPORTANT
This method is available only if you implement the Grid pattern in your application.
GetCellText Method
Description
Returns the text provided by the cell's Text pattern.
Syntax
object.GridPattern.GetCellText(int rowIndex, int columnIndex)
Arguments
Parameter | Description |
---|---|
rowIndex | Required. An integer. The cell row index. |
columnIndex | Required. An integer. The cell column index. |
Return Type
A text string.
IMPORTANT
This method is available only if you implement the Grid pattern in your application.
GetChildId Method
Description
Retrieves the Microsoft Active Accessibility child identifier for the current object.
Syntax
object.LegacyIAccessiblePattern.GetChildId
Return Type
An integer.
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in your application.
GetColumnCount Method
Description
Retrieves the number of columns in the grid.
Syntax
object.GridPattern.GetColumnCount
Return Type
An integer.
IMPORTANT
This method is available only if you implement the Grid pattern in your application.
GetColumnHeaders Method
Description
Retrieves a collection of UI Automation objects representing all the column headers in a table.
Syntax
object.TablePattern.GetColumnHeaders
Return Type
A collection of UI Automation objects.
IMPORTANT
This method is available only if you implement the Table pattern in an object in your application.
GetColumnHeaderItems Method
Description
Retrieves the column headers associated with a table item or cell.
Syntax
object.TableItemPattern.GetColumnHeaderItems
Return Type
A collection of UI Automation objects.
IMPORTANT
This method is available only if you implement the TableItem pattern in an object in your application.
GetColumnIndex Method
Description
Retrieves the zero-based index of the column that contains the grid item.
Syntax
object.GridItemPattern.GetColumnIndex
Return Type
An integer.
IMPORTANT
This method is available only if you implement the GridItem pattern in an object in your application.
GetContainingGrid Method
Description
Retrieves a UI Automation object that supports the Grid pattern and represents the container of the cell or item.
Syntax
object.GridItemPattern.GetContainingGrid
Return Type
A UI Automation object.
IMPORTANT
This method is available only if you implement the GridItem pattern in an object in your application.
GetDescription Method
Description
Retrieves the Microsoft Active Accessibility description for the current object.
Syntax
object.LegacyIAccessiblePattern.GetDescription
Return Type
A string.
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
GetDefaultOperation Method
Description
Retrieves the Microsoft Active Accessibility default operation for the current object.
Syntax
object.LegacyIAccessiblePattern.GetDefaultOperation
Return Type
A string.
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
GetExpandCollapseState Method
Description
Gets the ExpandCollapse state of the element.
Syntax
object.ExpandCollapsePattern.GetExpandCollapseState
Return Type
ExpandCollapse state.
Possible values:
0 = Collapsed. No child nodes, controls, or content of the UI Automation element are displayed.
1 = Expanded. All child nodes, controls or content of the UI Automation element are displayed.
2 = PartiallyExpanded. Some, but not all, child nodes, controls, or content of the UI Automation element are displayed.
3 = LeafNode. The UI Automation element has no child nodes, controls, or content to display.
IMPORTANT
The ExpandCollapse state refers to the visibility of immediate child objects only; it does not refer to the visibility of all descendant objects.
This method is available only if you implement the ExpandCollapse pattern in an object in your application.
GetHelp Method
Description
Retrieves the Microsoft Active Accessibility help string for the current object.
Syntax
object.LegacyIAccessiblePattern.GetHelp
Return Type
A help string.
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
GetHorizontalScrollPercent Method
Description
Gets the current horizontal scroll position.
Syntax
object.ScrollPattern.GetHorizontalScrollPercent
Return Type
A value of Double type.
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
GetHorizontalViewSize Method
Description
Gets the current horizontal view size.
Syntax
object.ScrollPattern.GetHorizontalViewSize
Return Type
A value of Double type.
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
GetKeyboardShortcut Method
Description
Retrieves the Microsoft Active Accessibility keyboard shortcut for the current object.
Syntax
object.LegacyIAccessiblePattern.GetKeyboardShortcut
Return Type
A string.
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
GetLargeChange Method
Description
Gets the control-specific large-change value that is added to or subtracted from the Value of the current UI Automation object.
Syntax
object.RangeValuePattern.GetLargeChange
Return Type
A value of Double type.
IMPORTANT
This method is available only if you implement the RangeValue pattern in an object in your application.
GetMaximum Method
Description
Gets the maximum value supported by the UI Automation object.
Syntax
object.RangeValuePattern.GetMaximum
Return Type
A value of Double type.
IMPORTANT
This method is available only if you implement the RangeValue pattern in an object in your application.
GetMinimum Method
Description
Gets the minimum value supported by the UI Automation object.
Syntax
object.RangeValuePattern.GetMinimum
Return Type
A value of Double type.
IMPORTANT
This method is available only if you implement the RangeValue pattern in an object in your application.
GetName Method
Description
Retrieves the Microsoft Active Accessibility name for the current object.
Syntax
object.LegacyIAccessiblePattern.GetName
Return Type
A string.
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
GetPrimaryTraversalDirection Method
Description
Retrieves the primary direction of traversal for the table.
Syntax
object.TablePattern.GetPrimaryTraversalDirection
Return Type
The table traversal direction.
IMPORTANT
This method is available only if you implement the Table pattern in an object in your application.
GetRole Method
Description
Retrieves the Microsoft Active Accessibility role for the current object.
Syntax
object.LegacyIAccessiblePattern.GetRole
Return Type
An accessible role.
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
GetRowHeaders Method
Description
Retrieves a collection of UI Automation objects representing all the row headers in a table.
Syntax
object.TablePattern.GetRowHeaders
Return Type
A collection of UI Automation objects.
IMPORTANT
This method is available only if you implement the Table pattern in an object in your application.
GetRowHeaderItems Method
Description
Retrieves the row headers associated with a table item or cell.
Syntax
object.TableItemPattern.GetRowHeaderItems
Return Type
A collection of UI Automation objects.
IMPORTANT
This method is available only if you implement the TableItem pattern in an object in your application.
GetRowCount Method
Description
Retrieves the number of rows in the grid.
Syntax
object.GridPattern.GetRowCount
Return Type
An integer
IMPORTANT
This method is available only if you implement the Grid pattern in an object in your application.
GetRowIndex Method
Description
Retrieves the zero-based index of the row that contains the grid item.
Syntax
object.GridItemPattern.GetRowIndex
Return Type
An integer
IMPORTANT
This method is available only if you implement the GridItem pattern in an object in your application.
GetSelection Method
Supported on UFT One versions 2021 R1 and later.
Description
Returns the object's selected text, or an empty string if no text is selected.
Syntax
object.TextPattern.GetSelection
Return Type
A string
IMPORTANT
For multiple selections, the result is a single string in which selected entities are concatenated with no separator and sorted by their positions in text, in ascending order.
This method is available only if you implement the Text pattern in an object in your application.
GetSelectedChildren Method
Description
Retrieves the Microsoft Active Accessibility selected children of the current object.
Syntax
object.LegacyIAccessiblePattern.GetSelectedChildren
Return Type
A UI Automation object.
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
GetSelectedChildren Method
Description
Retrieves all selected items from the container.
Syntax
object.SelectionPattern.GetSelectedChildren
Return Type
A UI Automation object.
IMPORTANT
This method is available only if you implement the Selection pattern in an object in your application.
GetSmallChange Method
Description
Gets the control-specific small-change value that is added to or subtracted from the Value of the current UI Automation object.
Syntax
object.RangeValuePattern.GetSmallChange
Return Type
A value of Double type.
IMPORTANT
This method is available only if you implement the RangeValue pattern in an object in your application.
GetSpannedColumns Method
Description
Retrieves the number of columns spanned by a cell or item.
Syntax
object.GridItemPattern.GetSpannedColumns
Return Type
An integer
IMPORTANT
This method is available only if you implement the GridItem pattern in an object in your application.
GetSpannedRows Method
Description
Retrieves the number of rows spanned by a cell or item.
Syntax
object.GridItemPattern.GetSpannedRows
Return Type
An integer.
IMPORTANT
This method is available only if you implement the GridItem pattern in an object in your application.
GetState Method
Description
Retrieves the Microsoft Active Accessibility state for the current object.
Syntax
object.LegacyIAccessiblePattern.GetState
Return Type
The accessibility state.
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
GetSupportedSelectionMode Method
Description
Indicates the type of text selection that is supported by the control.
Syntax
object.TextPattern.GetSupportedSelectionMode
Return Type
A number indicating the type of text selection the object supports.
0: No text selection supported.
1: Supports a single and continuous text selection.
2: Supports multiple and non-contiguous text selections.
IMPORTANT
This method is available only if you implement the Text pattern in an object in your application.
GetText Method
Description
Retrieves the text of the object.
Syntax
object.TextPattern.GetText
Return Type
A string with the text of an object.
IMPORTANT
This method is available only if you implement the Text pattern in an object in your application.
GetToggleState Method
Description
Provides access to the property values of a Toggle Pattern object using its Current or Cached accessors.
Syntax
object.TogglePattern.GetToggleState
Return Type
The toggle state.
IMPORTANT
This method is available only if you implement the Toggle pattern in an object in your application.
GetValue Method
Description
Retrieves the value of the UI Automation element.
Syntax
object.ValuePattern.GetValue
Return Type
A string
IMPORTANT
This method is available only if you implement the Value pattern in an object in your application.
GetValue Method
Description
Gets the current value of the UI Automation object.
Syntax
object.RangeValuePattern.GetValue
Return Type
A string.
IMPORTANT
This method is available only if you implement the RangeValue pattern in an object in your application.
GetValue Method
Description
Retrieves the Microsoft Active Accessibility value for the current object.
Syntax
object.LegacyIAccessiblePattern.GetValue
Return Type
A string.
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
GetVerticalScrollPercent Method
Description
Gets the current vertical scroll position.
Syntax
object.ScrollPattern.GetVerticalScrollPercent
Return Type
A value of Double type.
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
GetVerticalViewSize Method
Description
Gets the current vertical view size.
Syntax
object.ScrollPattern.GetVerticalViewSize
Return Type
A value of Double type.
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
GetVisibleText Method
Supported on UFT One versions 2021 R1 and later.
Description
Returns all visible text from the object.
Syntax
object.TextPattern.GetVisibleText
Return Type
A string
IMPORTANT
This method is available only if you implement the Text pattern in an object in your application.
GetWindowInteractionState Method
Description
Retrieves the interaction state of the window.
Syntax
object.WindowPattern.GetWindowInteractionState
Return Type
Integer.
Possible Values:
0 = Running. Indicates that the window is running. This does not guarantee that the window is responding or ready for user interaction.
1 = Closing. Indicates that the window is closing.
2 = ReadyForUserInteraction. Indicates that the window is ready for user interaction.
3 = BlockedByModalWindow. Indicates that the window is blocked by a modal window.
4 = NotResponding. Indicates that the window is not responding.
IMPORTANT
This method is available only if you implement the Window pattern in an object in your application.
GetWindowVisualState Method
Description
Retrieves the visual state of the window.
Syntax
object.WindowPattern.GetWindowVisualState
Return Type
Integer.
Possible Values:
0 - Normal (restored)
1 - Maximized
2 - Minimized
IMPORTANT
This method is available only if you implement the Window pattern in an object in your application.
Invoke Method
Description
Invokes the action of a control, such as a button click.
Syntax
object.InvokePattern.Invoke
Return Type
None
IMPORTANT
This method is available only if you implement the Invoke pattern in an object in your application.
IsMaximized Property
Description
Indicates whether the window is maximized at present.
Syntax
object.WindowPattern.IsMaximized
Return Type
A value of Boolean type.
IMPORTANT
This property is available only if you implement the Window pattern in an object in your application.
IsMinimized Property
Description
Indicates whether the window is minimized at present.
Syntax
object.WindowPattern.IsMinimized
Return Type
A value of Boolean type.
IMPORTANT
This property is available only if you implement the Window pattern in an object in your application.
IsModal Property
Description
Indicates whether the window is modal.
Syntax
object.WindowPattern.IsModal
Return Type
A Boolean type value.
IMPORTANT
This property is available only if you implement the Window pattern in an object in your application.
IsSelectionRequired Property
Description
Gets a value that specifies whether the container requires at least one child item to be selected.
Syntax
object.SelectionPattern.IsSelectionRequired
Return Type
A value of Boolean type.
IMPORTANT
This property is available only if you implement the Selection pattern in an object in your application.
IsReadOnly Property
Description
Indicates whether the value of the control is read-only.
Syntax
object.ValuePattern.IsReadOnly
Return Type
A value of Boolean type.
IMPORTANT
This property is available only if you implement the Value pattern in an object in your application.
IsSelected Property
Description
Indicates whether an object is selected.
Syntax
object.SelectionItemPattern.IsSelected
Return Type
A value of Boolean type.
IMPORTANT
This method is available only if you implement the SelectionItem pattern in an object in your application.
IsReadOnly Property
Description
Indicates whether the value of a UI Automation object is read-only.
Syntax
object.RangeValuePattern.IsReadOnly
Return Type
A value of Boolean type.
IMPORTANT
This method is available only if you implement the RangeValue pattern in an object in your application.
IsTopMost Property
Description
Indicates whether the window is a top-level object.
Syntax
object.WindowPattern.IsTopMost
Return Type
None
IMPORTANT
This property is available only if you implement the Window pattern in an object in your application.
Maximize Method
Description
Enlarges the window to full screen size. This sets the window's visual state to 1.
Syntax
object.WindowPattern.Maximize
Return Type
None
IMPORTANT
This method is available only if you implement the Window pattern in an object in your application.
Minimize Method
Description
Reduces the window to an icon. This sets the window's visual state to 2.
Syntax
object.WindowPattern.Minimize
Return Type
None
IMPORTANT
This method is available only if you implement the Window pattern in an object in your application.
PerformDefaultOperation Method
Description
Performs the default operation on the control.
Syntax
object.LegacyIAccessiblePattern.PerformDefaultOperation
Return Type
None
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
RemoveFromSelection Method
Description
Deselects the current item.
Syntax
object.SelectionItemPattern.RemoveFromSelection
Return Type
None
IMPORTANT
This method is available only if you implement the SelectionItem pattern in an object in your application.
Restore Method
Description
Restores the window to its previous size. This sets the window's visual state to 0.
Syntax
object.WindowPattern.Restore
Return Type
None
IMPORTANT
This method is available only if you implement the Window pattern in an object in your application.
Scroll Method
Description
Scrolls the visible region of the content area horizontally and vertically.
Syntax
object.ScrollPattern.Scroll horiztonalAmount, verticalAmount
Arguments
Parameter | Description |
---|---|
horizontalAmount | Required. A predefined value. The horizontal direction and increment size to use for the scroll. Possible values:
|
verticalAmount | Required. A predefined value. The vertical direction and increment size to use for the scroll. Possible values:
|
Return Type
None
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
Large steps are equivalent to PageUp/PageDown or clicking on a blank part of a scroll bar. If these are not relevant to the control, a large step is an amount equal to the current visible window.
Small steps are equivalent to pressing an arrow key or clicking the arrow button on a scroll bar.
ScrollHorizontal Method
Description
Scrolls the visible region of the content area horizontally.
Syntax
object.ScrollPattern.ScrollHorizontal horiztonalAmount
Arguments
Parameter | Description |
---|---|
horizontalAmount | Required. A predefined value. The horizontal direction and increment size to use for the scroll. Possible values:
|
Return Type
None
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
Large steps are equivalent to PageUp/PageDown or clicking on a blank part of a scroll bar. If these are not relevant to the control, a large step is an amount equal to the current visible window.
Small steps are equivalent to pressing an arrow key or clicking the arrow button on a scroll bar.
ScrollIntoView Method
Description
Scrolls an item in a scrollable view into view.
Syntax
object.ScrollItemPattern.ScrollIntoView
Return Type
None
IMPORTANT
This method is available only if you implement the ScrollItem pattern in an object in your application.
ScrollIntoView Method
Supported on UFT One versions 2021 R1 and later.
Description
Scrolls a text control to bring the specified area into view.
Syntax
object.TextPattern.ScrollIntoView(numberOfUnits, [unitType], [Direction], [Alignment])
Arguments
Parameter | Description |
---|---|
numberOfUnits | An integer. The number of text units to scroll. |
unitType | Optional. The text unit type. Possible values:
|
Direction | Optional. The direction in which to scroll. Possible values:
|
Alignment | Optional. Indicates whether to display the text on the top or bottom of the object. Possible values:
|
Return Type
None
IMPORTANT
Make sure the parameters you provide do not attempt to scroll beyond the beginning or end of the document, unless your application specifically allows such scrolling.
The scrolling starts from the beginning of the object and can continue beyond the object. For example, when called on a UIAProEdit object, you can scroll 50 lines backwards, into previous UIAPro objects.
This method is available only if you implement the Text pattern in an object in your application.
Set obj = UIAProWindow("UIAText.docx - Word").UIAProDocument("UIAText.docx")
'from start of the current document, perform a scroll by an amount of 100 lines, in forward direction,
'then show the matching line aligned to top of the viewport / container
obj.TextPattern.ScrollintoView 100, TextUnit_Line, Direction_Forward, Alignment_Top
'this is equivalent with the previous statement, since the optional arguments will use the default value 0
obj.TextPattern.ScrollintoView 100
'from start of the current document, perform a scroll by an amount 100 lines, in forward direction,
'then show the matching line aligned to bottom of the viewport / container
obj.TextPattern.ScrollintoView 100, TextUnit_Line, Direction_Forward, Alignment_Bottom
'from start of the current document, perform a scroll by an amount 10 pages, in forward direction
'(this action will fail if it exceeds the end of the text)
obj.TextPattern.ScrollintoView 10, TextUnit_Page, Direction_Forward
'from start of the current document, perform a scroll by an amount 1 page, in backward direction
'(this action will fail if it precedes the beginning of the text)
obj.TextPattern.ScrollintoView 1, TextUnit_Page, Direction_Backward
ScrollVertical Method
Description
Scrolls the visible region of the content area vertically.
Syntax
object.ScrollPattern.ScrollVertical verticalAmount
Arguments
Parameter | Description |
---|---|
verticalAmount | Required. A predefined value. The vertical direction and increment size to use for the scroll. Possible values:
|
Return Type
None
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
Large steps are equivalent to PageUp/PageDown or clicking on a blank part of a scroll bar. If these are not relevant to the control, a large step is an amount equal to the current visible window.
Small steps are equivalent to pressing an arrow key or clicking the arrow button on a scroll bar.
Select Method
Supported on UFT One versions 2021 R1 and later.
Description
Selects the specified text in the object.
Syntax
object.TextPattern.Select(startIndex, length)
Arguments
Parameter | Description |
---|---|
startIndex | Integer. The text position from which the selection begins. The value is zero-based. |
length | Integer. Optional. The number of characters to be selected. If this parameter is not specified, all remaining text will be selected. |
Return Type
None
IMPORTANT
This method is available only if you implement the Text pattern in an object in your application.
obj.TextPattern.Select 0, 10 ' highlights the first 10 characters
obj.TextPattern.Select 9, 20 ' highlights 20 characters starting from the 10th
obj.TextPattern.Select 0 ' equivalent with SelectAll
obj.TextPattern.Select 10 ' highlights all characters starting from 11th forward
Select Method
Description
Deselects any selected items and then selects the current item.
Syntax
object.SelectionItemPattern.Select
Return Type
None
IMPORTANT
This method is available only if you implement the SelectionItem pattern in an object in your application.
Select Method
Description
Selects the element.
Syntax
object.LegacyIAccessiblePattern.Select(SelectOptions selectionOptions)
Arguments
Parameter | Description |
---|---|
selectionOptions | The flag to use when selecting the element. |
Return Type
None
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
SelectAll Method
Supported on UFT One versions 2021 R1 and later.
Description
Selects all of the object’s text.
Syntax
object.TextPattern.SelectAll
Return Type
None
IMPORTANT
This method is available only if you implement the Text pattern in an object in your application.
SelectCell Method
Description
Selects a cell in the grid.
Syntax
object.GridPattern.SelectCell rowIndex, columnIndex
Arguments
Parameter | Description |
---|---|
rowIndex | Required. An integer. The cell row index. |
columnIndex | Required. An integer. The cell column index. |
Return Type
None
IMPORTANT
This method is available only if you implement the Grid pattern in an object in your application.
SetCellValue Method
Description
Sets the specified cell’s value using the Value pattern.
Syntax
object.GridPattern.SetCellValue(int rowIndex, int columnIndex, string cellValue)
Arguments
Parameter | Description |
---|---|
rowIndex | Required. An integer. The cell row index. |
columnIndex | Required. An integer. The cell column index. |
cellValue | The value to be set for the specified cell. |
Return Type
None
IMPORTANT
This method is available only if you implement the Grid pattern in an object in your application.
SetValue Method (LegacyIAccessible)
Description
Sets the Microsoft Active Accessibility value for the current object.
Syntax
object.LegacyIAccessiblePattern.SetValue(string valueToSet)
Return Type
None
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
SetValue Method
Description
Sets the current value of the UI Automation object.
Syntax
object.RangeValuePattern.SetValue (double valueToSet)
Return Type
None
IMPORTANT
This method is available only if you implement the RangeValue pattern in an object in your application.
SetHorizontalScrollPercent Method
Description
Sets the horizontal scroll position as a percentage of the total content area within the automation element.
Syntax
object.ScrollPattern.SetHorizontalScrollPercent horiztonalPercent
Arguments
Parameter | Description |
---|---|
horizontalPercent | Required. A Double value. The percentage of the total horizontal content area. |
Return Type
None
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
This method is only useful when the content area of the object is larger than the visible region of the object.
SetScrollPercent Method
Description
Sets the horizontal and vertical scroll position as a percentage of the total content area within the automation element.
Syntax
object.ScrollPattern.SetScrollPercent horizontalPercent, verticalPercent
Arguments
Parameter | Description |
---|---|
horizontalPercent | Required. A Double value. The percentage of the total horizontal content area. |
verticalPercent | Required. A Double value. The percentage of the total vertical content area. |
Return Type
None
IMPORTANT
- This method is available only if you implement the Scroll pattern in an object in your application.
This method is only useful when the content area of the object is larger than the visible region of the object.
SetSecure Method
Description
Sets the encrypted Microsoft Active Accessibility value for the current object.
Syntax
object.LegacyIAccessiblePattern.SetSecureValue Text
Arguments
Parameter | Description |
---|---|
Text | Required. A string. |
Return Type
None
IMPORTANT
This method is available only if you implement the LegacyIAccessible pattern in an object in your application.
SetSecure Method
Description
Sets the encrypted value of the UI Automation element.
Syntax
object.ValuePattern.SetSecureValue Text
Arguments
Parameter | Description |
---|---|
Text | Required. A string. |
Return Type
None
IMPORTANT
This method is available only if you implement the Value pattern in an object in your application.
SetValue Method
Description
Sets the value of the UI Automation element.
Syntax
object.ValuePattern.SetValue(string valueToSet)
Arguments
Parameter | Description |
---|---|
valueToSet | Required. A string. The value to set. |
Return Type
None
IMPORTANT
This method is available only if you implement the Value pattern in an object in your application.
SetVerticalScrollPercent Method
Description
Sets the vertical scroll position as a percentage of the total content area within the automation element.
Syntax
object.ScrollPattern.SetVerticalScrollPercent verticalPercent
Arguments
Parameter | Description |
---|---|
verticalPercent | Required. A Double value. The percentage of the total vertical content area. |
Return Type
None
IMPORTANT
This method is available only if you implement the Scroll pattern in an object in your application.
This method is only useful when the content area of the object is larger than the visible region of the object.
Toggle Method
Description
Cycles through the toggle states of the control.
Syntax
object.TogglePattern.Toggle
Return Type
None
IMPORTANT
This method is available only if you implement the Toggle pattern in an object in your application.
WaitForInputIdle Method
Description
Waits until the window is ready for input or the timeout expires.
Syntax
object.WindowPattern.WaitForInputIdle milliseconds
Arguments
Parameter | Description |
---|---|
milliseconds | Required. An Integer. The number of milliseconds to wait for the object to become ready. |
Return Type
None
IMPORTANT
This method is available only if you implement the Window pattern in an object in your application.
See also:
- UIAProAppBar
- UIAProButton
- UIAProCalendar
- UIAProCheckBox
- UIAProComboBox
- UIAProDataGrid
- UIAProDataItem
- UIAProDocument
- UIAProEdit
- UIAProGroup
- UIAProHeader
- UIAProHeaderItem
- UIAProHyperLink
- UIAProImage
- UIAProList
- UIAProListItem
- UIAProMenu
- UIAProMenuBar
- UIAProMenuItem
- UIAProObject
- UIAProPane
- UIAProProgressBar
- UIAProRadioButton
- UIAProScrollBar
- UIAProSemanticZoom
- UIAProSeparator
- UIAProSlider
- UIAProSpinner
- UIAProSplitButton
- UIAProStatusBar
- UIAProTab
- UIAProTabItem
- UIAProTable
- UIAProText
- UIAProThumb
- UIAProTitleBar
- UIAProToolBar
- UIAProToolTip
- UIAProTree
- UIAProTreeItem
- UIAProWindow