UIAProTab Object

Description

A tab object in an application that supports UIAutomation.

IMPORTANT

  • The UIAProTab object represents controls with Control Type UIA_TabControlTypeId = 50018

  • UIA Pro object model reference details are shared for all UIA test objects. However, Grid pattern methods are not supported by the UIAProTab object.

    Therefore, the Grid pattern methods described on this page are not supported for UIAProTab objects.

Operations

The sections below list the built-in methods and properties that you can use as operations for the UIAProTab object.

Note: You can also view a list and descriptions of the UIAProTab 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.

Note: In the enhanced Beta UIA Pro Add-in, this method is supported for backward compatibility only. Use DoubleClick instead.

Common Method CaptureBitmapSaves a screen capture of the object as a .png or .bmp image, depending on the specified file extension.
Common Method CheckChecks whether the actual value of an item matches the expected value.
Common Method CheckPropertyChecks whether the specified object property achieves the specified value within the specified timeout.
Common Method ChildObjects

Returns the collection of child objects contained within the object.

Note: In the enhanced Beta UIA Pro Add-in, this method is supported for backward compatibility only. Use GetChildren and GetDescendants instead.

ClickClicks the object.
DoubleClick

Double-clicks the object to activate it.

Note: Supported when using the enhanced Beta UIA Pro Add-in. In the default UIA Pro Add-in, use Activate.

Common Method GetAllROProperties

Returns the collection of properties and current values from the object in the application.

 GetAncenstors

Returns the collection of all of the parent objects in the object's hierarchy, up to the root.

Note: Supported when using the enhanced UIA Pro Add-in (Beta).

 GetChildren

Returns the collection of immediate children contained within the object.

Note: Supported when using the enhanced UIA Pro Add-in (Beta).

 GetDescendants

Returns the collection of all of the objects contained or nested beneath the object.

Note: Supported when using the enhanced UIA Pro Add-in (Beta).

 GetParent

Returns the object's immediate parent object.

Note: Supported when using the enhanced UIA Pro Add-in (Beta).

Common Method GetROPropertyReturns the current value of the specified description property from the object in the application.
GetSupportedPatternsReturns an array or collection of the patterns supported by the current UI Automation object.
Common Method GetTOPropertiesReturns the collection of properties and values used to identify the object.
Common Method GetTOPropertyReturns the value of the specified description property from the test object description.
HasSupportedPatternIndicates whether the current UI Automation object supports a specific automation pattern.
HasSupportedPatternsIndicates whether the current UI Automation object supports the specified automation patterns.
Common Method HighlightHighlights the object in the application.
Common Method OutputRetrieves the current value of an item and stores it in a specified location.
Common Method RefreshObjectInstructs OpenText Functional Testing to re-identify the object in the application the next time a step refers to this object.
Common Method SetTOPropertySets the value of the specified description property in the test object description.
Common Method ToString

Returns a string that represents the current test object.

TypeSimulates keyboard input on the object.
Common Method WaitPropertyWaits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Common Property

Common Property ExistChecks whether the object currently exists in the open application.

UIAPro Pattern-Based methods and properties

ExpandCollapse pattern

Method/PropertyDescription
CollapseHides all child nodes, controls, or content of the element.
ExpandDisplays all child nodes, controls, or content of the element.
GetExpandCollapseStateGets the Expand or Collapse state of the element.

Grid pattern

MethodDescription
ActivateCell

Activates (double-clicks) the specified cell in the grid.

Note: In the enhanced Beta UIA Pro Add-in, this method is supported for backward compatibility only. Use DoubleClickCell instead.

AddCellToSelectionSelects a cell in addition to previously selected cells.
AddRowToSelectionSelects a row in addition to previously selected rows.
ClickCellClicks the specified cell in the grid.
DoubleClickCell

Double-clicks the specified cell in the grid to activate it.

Note: Supported when using the enhanced Beta UIA Pro Add-in. In the default UIA Pro Add-in, use ActivateCell.

GetCellRetrieves a UI Automation object representing an item in the grid.
GetCellNameReturns the value of the name property for the specified cell.
GetCellTextReturns the text provided by the cell’s Text pattern.
GetCellValueReturns the value provided by the cell's Value pattern.
GetColumnCountRetrieves the number of columns in the grid.
GetRowCountRetrieves the number of rows in the grid.
SelectCellSelects a cell in the grid.
SelectRow

Selects a row in the grid.

Note: Supported when using the enhanced UIA Pro Add-in (Beta).

SetCellValueSets the specified cell’s value using the Value pattern.

GridItem pattern

MethodDescription
GetColumnIndexRetrieves the zero-based index of the column that contains the grid item.
GetContainingGridRetrieves a UI Automation object that supports Grid pattern and represents the container of the cell or item.
GetRowIndexRetrieves the zero-based index of the row that contains the grid item.
GetSpannedColumnsRetrieves the number of columns spanned by a cell or item.
GetSpannedRowsRetrieves the number of rows spanned by a cell or item.

Invoke pattern

MethodDescription
InvokeInvokes the action of a control, such as a button click.

LegacyIAccessible pattern

MethodDescription
GetChildIdRetrieves the Microsoft Active Accessibility child identifier for the current object.
GetDefaultOperationRetrieves the Microsoft Active Accessibility default operation for the current object.
GetDescriptionRetrieves the Microsoft Active Accessibility description for the current object.
GetHelpRetrieves the Microsoft Active Accessibility help string for the current object.
GetKeyboardShortcutRetrieves the Microsoft Active Accessibility keyboard shortcut for the current object.
GetNameRetrieves the Microsoft Active Accessibility name for the current object.
GetRoleRetrieves the Microsoft Active Accessibility role for the current object.
GetSelectedChildrenRetrieves the Microsoft Active Accessibility selected children of the current object.
GetStateRetrieves the Microsoft Active Accessibility state for the current object.
GetValueRetrieves the Microsoft Active Accessibility value for the current object.
SelectSelects the element.
SetSecureValueSets the encoded Microsoft Active Accessibility value for the current object.
SetValueSets the Microsoft Active Accessibility value for the current object.
PerformDefaultOperationPerforms the default operation on the control.

RangeValue pattern

Method/PropertyDescription
GetLargeChangeGets the control-specific large-change value that is added to or subtracted from the Value of the current UI Automation object.
GetMaximumGets the maximum value supported by the UI Automation object.
GetMinimumGets the minimum value supported by the UI Automation object.
GetSmallChangeGets the control-specific small-change value that is added to or subtracted from the Value of the current UI Automation object.
GetValueGets the current value of the UI Automation object.
Common Property IsReadOnlyIndicates whether the value of a UI Automation object is read-only.
SetValueSets the current value of the UI Automation object.

Scroll pattern

Method/PropertyDescription
Common Property CanScrollHorizontallyIndicates whether the UI Automation element can scroll horizontally.
Common Property CanScrollVerticallyIndicates whether the UI Automation element can scroll vertically.
GetHorizontalScrollPercentGets the current horizontal scroll position.
GetHorizontalViewSizeGets the current horizontal view size.
GetVerticalScrollPercentGets the current vertical scroll position.
GetVerticalViewSizeGets the current vertical view size.
ScrollScrolls the visible region of the content area horizontally and vertically.
ScrollHorizontalScrolls the visible region of the content area horizontally.
ScrollVerticalScrolls the visible region of the content area vertically.
SetHorizontalScrollPercentSets the horizontal scroll position as a percentage of the total content area within the automation element.
SetScrollPercentSets the horizontal and vertical scroll position as a percentage of the total content area within the automation element.
SetVerticalScrollPercentSets the vertical scroll position as a percentage of the total content area within the automation element.

ScrollItem pattern

Method/PropertyDescription
ScrollIntoView

Scrolls an item in a scrollable view into view.

Selection pattern

Method/PropertyDescription
Common Property CanSelectMultipleItemsIndicates whether multiple items in the container can be selected at once.
ClearSelection

Deselects any selected items in the object.

Note: Supported when using the enhanced UIA Pro Add-in (Beta).

Common Property IsSelectionRequiredGets a value that specifies whether the container requires at least one child item to be selected.
GetSelectedChildrenRetrieves all selected items from the container.

SelectionItem pattern

Method/PropertyDescription
AddToSelectionSelects the item in addition to the previously selected items.
Common Property IsSelected Indicates whether the item is selected.
RemoveFromSelectionDeselects the current item.
SelectDeselects any selected items and then selects the current item.

Table pattern

MethodDescription
GetColumnHeadersRetrieves a collection of UI Automation objects representing all the column headers in a table.
GetPrimaryTraversalDirectionRetrieves the primary direction of traversal for the table.
GetRowHeadersRetrieves a collection of UI Automation objects representing all the row headers in a table.

TableItem pattern

MethodDescription
GetColumnHeaderItemsRetrieves the column headers associated with a table item or cell.
GetRowHeaderItemsRetrieves the row headers associated with a table item or cell.

Text pattern

MethodDescription

ClearSelection

Clears any text selections in the object.

GetSelection

Returns the object's selected text, or an empty string if no text is selected.
GetSupportedSelectionModeIndicates the type of text selection that is supported by the control.
GetTextRetrieves the text of the object.

GetVisibleText

Returns all visible text from the object.

ScrollIntoView

Scrolls a text control to bring the specified area into view.

Select

Selects the specified text in the object.

SelectAll

Selects all of the object’s text.

Toggle pattern

MethodDescription
GetToggleStateProvides access to the property values of a Toggle Pattern object using its Current or Cached accessors.
ToggleCycles through the toggle states of the control.

Value pattern

Method/PropertyDescription
GetValueRetrieves the value of the UI Automation element.
Common Property IsReadOnlyIndicates whether the value of the control is read-only.
SetSecureValueSets the encrypted value of the UI Automation element.
SetValueSets the value of the UI Automation element.

Window pattern

Method/PropertyDescription
Common Property CanMaximizeIndicates whether the window can be maximized.
Common Property CanMinimize

Indicates whether the window can be minimized.

CloseCloses the window.
GetWindowInteractionStateRetrieves the interaction state of the window.
GetWindowVisualStateRetrieves the visual state of the window.
Common Property IsMaximizedIndicates whether the window is maximized.
Common Property IsMinimizedIndicates whether the window is minimized.
Common Property IsModalIndicates whether the window is modal.
Common Property IsTopMost

Indicates whether the window is set to always be displayed in front of other windows, even when it's not the active window.

MaximizeEnlarges the window to full screen size.

Minimize

Reduces the window to an icon.
RestoreRestores the window to its previous size.
WaitForInputIdleWaits until the window is ready for input or the timeout expires.

Back to top

Activate Method

Replaced by DoubleClick in the enhanced Beta UIA Pro Add-in. Activate is supported for backward compatibility only.

Description

Double-clicks the object to activate it.

Syntax

object.Activate [x],[y]

Arguments

ParameterDescription
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

Back to top

Click Method

Description

Clicks the object.

Syntax

object.Click [x],[y], [button]

Arguments

ParameterDescription
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

Examples

Click Objects in the Application

Copy code
'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

Click on a Tree Item Added to an Object

Copy code
'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

Back to top

DoubleClick Method

Supported when using the enhanced Beta UIA Pro Add-in. In the legacy UIA Pro Add-in, use Activate.

Description

Double-clicks the object to activate it.

Syntax

object.DoubleClick [x],[y]

Arguments

ParameterDescription
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

Back to top

GetAncestors Method

Supported when using the enhanced UIA Pro Add-in (Beta).

Description

Returns the collection of all of the parent objects in the object's hierarchy, up to the root.

Syntax

object.GetAncestors [description],[maxDepthLevel]

Arguments

ParameterDescription
description

Optional. A dynamic programmatic test object description. For details, see the topic on dynamic programmatic descriptions in the Help Center.

If specified, only ancestor objects that match the description are returned.

Note: To omit this argument and provide only the maxDepthLevel , pass the keyword nothing instead of this argument. For example: Set ancestors = testObject.GetAncestors(nothing,4)

maxDepthLevel

Optional. A long integer value.

The maximum number of levels up in the hierarchy from which to return ancestor objects. The object's immediate parent is level 1, its parent is level 2, and so on.

If specified, only ancestor objects up to and including the specified level are returned.

Return Type

A collection of UI Automation objects.

IMPORTANT

  • Retrieving multiple objects is time-consuming and may affect the performance of your test. Consider limiting the number of objects by providing a description or maxDepthLevel.

  • When you describe an object by its properties, saving it in the object repository or describing it programmatically, a test can identify the object at any time and interact with it.

    However, objects retrieved by GetAncestors can be accessed only while the method's test object is available. Therefore, you must use the retrieved objects immediately, and before anything in the application changes.

  • Test objects are returned for any ancestor UI elements that your tested application exposes through the UIA framework. This is the hierarchy shown when you use Microsoft's Inspect tool.

    For some applications, this may show more objects than expected in comparison to the objects visible in the Object Spy. You can use these additional objects for testing or limit the object retrieval by using the description or maxDepthLevel arguments.

Examples

Highlight the ancestors of the specified test object

Copy code
Set ancestors = testObject.GetAncestors()
For i = 0 To ancestors.Count -1
ancestors.Item(i).Highlight
Next

Highlight the ancestors of the specified test object that match the specified description

Copy code
Set uiaEditDescription = Description.Create
uiaEditDescription("ClassName").Value = "UIAProEdit"
uiaEditDescription("Name").Value = "Edit1"

Set ancestors = testObject.GetAncestors(uiaEditDescription)
For i = 0 To ancestors.Count -1
ancestors.Item(i).Highlight
Next

Highlight up to 4 levels of ancestors of the specified test object that match the specified description

Copy code
Set uiaEditDescription = Description.Create
uiaEditDescription("ClassName").Value = "UIAProEdit"
uiaEditDescription("Name").Value = "Edit1"
 
Set ancestors = testObject.GetAncestors(uiaEditDescription,4)
For i = 0 To ancestors.Count -1
ancestors.Item(i).Highlight
Next

Highlight up to 4 levels of ancestors of the specified test object

Copy code
Set ancestors = testObject.GetAncestors(nothing,4)
For i = 0 To ancestors.Count -1
ancestors.Item(i).Highlight
Next

Back to top

GetChildren Method

Supported when using the enhanced UIA Pro Add-in (Beta).

Description

Returns the collection of all immediate children contained within the object.

Syntax

object.GetChildren [description]

Arguments

ParameterDescription
description

Optional. A dynamic programmatic test object description. For details, see the topic on dynamic programmatic descriptions in the Help Center.

If specified, only child objects that match the description are returned.

Return Type

A collection of UI Automation objects.

IMPORTANT

  • Retrieving multiple objects is time-consuming and may affect the performance of your test. Consider limiting the number of objects by providing a description.

  • When you describe an object by its properties, saving it in the object repository or describing it programmatically, a test can identify the object at any time and interact with it.

    However, objects retrieved by GetChildren can be accessed only while the method's test object is available. Therefore, you must use the retrieved objects immediately, and before anything in the application changes.

  • Test objects are returned for any child UI elements that your tested application exposes through the UIA framework. This is the hierarchy shows when you use Microsoft's Inspect tool.

    For some applications, this may show more objects than expected in comparison to the objects visible in the Object Spy. You can use these additional objects for testing or limit the object retrieval by using the description or maxDepthLevel arguments.

Example

Highlight the children of a test object

Copy code
Set children = testObject.GetChildren()
For i = 0 To children.Count -1
    children.Item(i).Highlight
Next

Highlight the children of a test object that match a specific description

Copy code
Set uiaEditDescription = Description.Create
uiaEditDescription("ClassName").Value = "UIAProEdit"
uiaEditDescription("Name").Value = "Edit1"

Set children = testObject.GetChildren(uiaEditDescription)
For i = 0 To children.Count -1
    children.Item(i).Highlight
Next

Back to top

GetDescendants Method

Supported when using the enhanced UIA Pro Add-in (Beta).

Description

Returns the collection of all of the objects contained or nested beneath the object.

Syntax

object.GetDescendants [description],[maxDepthLevel]

Arguments

ParameterDescription
description

Optional. A dynamic programmatic test object description. For details, see the topic on dynamic programmatic descriptions in the Help Center.

If specified, only objects that match the description are returned.

Note: To omit this argument and provide only the maxDepthLevel , pass the keyword nothing instead of this argument. For example: Set descendants = testObject.GetDescendants(nothing,4)

maxDepthLevel

Optional. A long integer value.

The maximum number of levels down in the hierarchy from which to return descendant objects. The object's immediate children are level 1, their children are level 2, and so on.

If specified, only descendant objects down to and including the specified level are returned.

Return Type

A collection of UI Automation objects.

IMPORTANT

  • Retrieving multiple objects is time-consuming and may affect the performance of your test. Consider limiting the number of objects by providing a description or maxDepthLevel.

  • When you describe an object by its properties, saving it in the object repository or describing it programmatically, a test can identify the object at any time and interact with it.

    However, objects retrieved by GetDescendants can be accessed only while the method's test object is available. Therefore, you must use the retrieved objects immediately, and before anything in the application changes.

  • Test objects are returned for any descendant UI elements that your tested application exposes through the UIA framework. This is the hierarchy shown when you use Microsoft's Inspect tool.

    For some applications, this may show more objects than expected in comparison to the objects visible in the Object Spy. You can use these additional objects for testing or limit the object retrieval by using the description or maxDepthLevel arguments.

Examples

Highlight the descendants of the specified test object

Copy code
Set descendants = testObject.GetDescendants()
For i = 0 To descendants.Count -1
descendants.Item(i).Highlight
Next

Highlight the descendants of the specified test object that match the specified description

Copy code
Set uiaEditDescription = Description.Create
uiaEditDescription("ClassName").Value = "UIAProEdit"
uiaEditDescription("Name").Value = "Edit1"

Set descendants = testObject.GetDescendants(uiaEditDescription)
For i = 0 To descendants.Count -1
descendants.Item(i).Highlight
Next

Highlight up to 4 levels of descendants of the specified test object that match the specified description

Copy code
Set uiaEditDescription = Description.Create
uiaEditDescription("ClassName").Value = "UIAProEdit"
uiaEditDescription("Name").Value = "Edit1"
 
Set descendants = testObject.GetDescendants(uiaEditDescription,4)
For i = 0 To descendants.Count -1
descendants.Item(i).Highlight
Next

Highlight up to 4 levels of descendants of the specified test object

Copy code
Set descendants = testObject.GetDescendants(nothing,4)
For i = 0 To descendants.Count -1
descendants.Item(i).Highlight
Next

Back to top

GetName Method

Supported when using the enhanced UIA Pro Add-in (Beta).

Description

Returns the name of the UI Automation element.

Syntax

object.GetName

Return Type

A String.

Back to top

GetParent Method

Supported when using the enhanced UIA Pro Add-in (Beta).

Description

Returns the object's immediate parent object.

Syntax

object.GetParent

Return Type

A UI Automation object. For the root object, which has no parent, nothing is returned.

Example

Highlight an object's parent object

Copy code
testObject.GetParent().Highlight

Validate that a test object has a parent object and perform operations on it

Copy code
Function IsValidObject(byVal value, byRef outputRef)
    If IsObject(value) Then
        set outputRef = value
        IsValidObject = True
    Else
        set outputRef = Nothing
        IsValidObject = False
    End If
End Function

Dim parent
If IsValidObject(testObject.GetParent(),parent) Then
    parent.Highlight
Else
    MsgBox "Object does not have any parent"
End If

Back to top

GetSupportedPatterns Method

Description

Returns an array or collection of the patterns supported by the current UI Automation object.

Syntax

object.GetSupportedPatterns

Return Type

In the legacy UIA Pro Add-in: An array

In the enhanced Beta UIA Pro Add-in: A collection of patterns

IMPORTANT

In the legacy UIA Pro Add-in, you might use UBound(<returned value>) in your script to count the array's items.

In the enhanced Beta UIA Pro Add-in, use <returned value>.Count, using the returned collection object.

Example

Print an object's supported patterns:

Copy code
Set supportedPatterns = testObject.GetSupportedPatterns()

For i = 0 To supportedPatterns.Count - 1

    print supportedPatterns.Item(i)

Next

Back to top

HasSupportedPattern Method

Description

Indicates whether the current UI Automation object supports a specific automation pattern.

Syntax

object.HasSupportedPattern (string patternName)

Arguments

ParameterDescription
PatternName

An automation pattern.

Return Type

A value of Boolean type.

Example

Check whether the object supports a specified pattern:

Copy code
hasSupportedPattern = testObject.HasSupportedPattern("LegacyIAccessible")

Back to top

HasSupportedPatterns Method

Description

Indicates whether the current UI Automation object supports the specified automation patterns.

Syntax

object.HasSupportedPatterns (string patternNames)

object.HasSupportedPatterns (string[] patternNames)

Arguments

ParameterDescription
PatternNames

An array or semi-colon delimited list of automation patterns.

Return Type

A value of Boolean type.

Example

Check whether the object supports a list of specified patterns, using an array:

Copy code
patterns = array("Grid","LegacyIAccessible")

hasSupportedPatterns = testObject.HasSupportedPatterns(patterns)

Check whether the object supports a list of specified patterns, using a semicolon-separated list:

Copy code
hasSupportedPatterns = testObject.HasSupportedPatterns("Text;LegacyIAccessible")

Back to top

Type Method

Description

Simulates keyboard input on the object.

Syntax

object.Type string

Arguments

ParameterDescription
string

Required. A string.

The characters to enter in the object.

Return Type

None

Back to top

ActivateCell Method

Replaced by DoubleClickCell in the enhanced Beta UIA Pro Add-in. Activate is supported for backward compatibility only.

Description

Activates (double-clicks) the specified cell in the grid.

Syntax

object.GridPattern.ActivateCell rowIndex, columnIndex, [x, y]

Arguments

ParameterDescription
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.

Back to top

AddCellToSelection Method

Description

Selects a cell in addition to previously selected cells.

Syntax

object.GridPattern.AddCellToSelection rowIndex, columnIndex

Arguments

ParameterDescription
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.

Back to top

AddRowToSelection Method

Description

Selects a row in addition to previously selected rows.

Syntax

object.GridPattern.AddRowToSelection rowIndex

Arguments

ParameterDescription
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.

Back to top

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.

Back to top

CanMaximize Property

Description

Indicates whether the window can be maximized.

Syntax

object.WindowPattern.CanMaximize

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.

Back to top

CanMinimize Property

Description

Indicates whether the window can be minimized.

Syntax

object.WindowPattern.CanMinimize

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

ClearSelection Method

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.

Back to top

ClearSelection Method

Supported when using the enhanced UIA Pro Add-in (Beta).

Description

Deselects any selected items in the object.

Syntax

object.SelectionPattern.ClearSelection

Return Type

None

IMPORTANT

This method is available only if you implement the Selection pattern in an object in your application.

Back to top

ClickCell Method

Description

Clicks the specified cell in the grid.

Syntax

object.GridPattern.ClickCell rowIndex,columnIndex, [x], [y], [button]

Arguments

ParameterDescription
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: 

  • 0 = left button (Default)
  • 1 = right button
  • 2 = middle button

Return Type

None

IMPORTANT

This method is available only if you implement the Grid pattern in an object in your application.

Back to top

DoubleClickCell Method

Supported when using the enhanced Beta UIA Pro Add-in. In the legacy UIA Pro Add-in, use ActivateCell.

Description

Double-clicks the specified cell in the grid to activate it.

Syntax

object.GridPattern.DoubleClickCell rowIndex, columnIndex, [x, y]

Arguments

ParameterDescription
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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

GetCell Method

Description

Retrieves a UI Automation object representing an item in the grid.

Syntax

object.GridPattern.GetCell(int rowIndex, int columnIndex)

Arguments

ParameterDescription
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.

Back to top

GetCellName Method

Description

Returns the value of the name property for the specified cell.

Syntax

object.GridPattern.GetCellName rowIndex, columnIndex

Arguments

ParameterDescription
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.

Back to top

GetCellValue Method

Description

Returns the value provided by the cell's value pattern.

Syntax

object.GridPattern.GetCellValue rowIndex, columnIndex

Arguments

ParameterDescription
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.

Back to top

GetCellText Method

Description

Returns the text provided by the cell's Text pattern.

Syntax

object.GridPattern.GetCellText(int rowIndex, int columnIndex)

Arguments

ParameterDescription
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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

GetExpandCollapseState Method

Description

Gets the ExpandCollapse state of the element.

Syntax

object.ExpandCollapsePattern.GetExpandCollapseState

Return Type

In the legacy UIA Pro Add-in: An Integer value. One of the numbers defined below.

In the enhanced Beta UIA Pro Add-in: A String value. One of the enumeration strings described below.

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

GetPrimaryTraversalDirection Method

Description

Retrieves the primary direction of traversal for the table.

Syntax

object.TablePattern.GetPrimaryTraversalDirection

Return Type

In the legacy UIA Pro Add-in: An Integer value. One of the numbers defined below.

In the enhanced Beta UIA Pro Add-in: A String value. One of the enumeration strings described below.

Possible values:

0 = "RowByRow". Indicates that data in the table should be read row by row.

1 = "ColumnByColumn". Indicates that data in the table should be read column by column.

2 = "Indeterminate". Indicates that data in a table should be read primarily by row or by column.

IMPORTANT

This method is available only if you implement the Table pattern in an object in your application.

Back to top

GetRole Method

Description

Retrieves the Microsoft Active Accessibility role for the current object.

Syntax

object.LegacyIAccessiblePattern.GetRole

Return Type

An accessible role. For possible values, see AccessibleRole values.

In the legacy UIA Pro Add-in: An Integer value.

In the enhanced Beta UIA Pro Add-in: A String value.

IMPORTANT

This method is available only if you implement the LegacyIAccessible pattern in an object in your application.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

GetSelection Method

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.

Back to top

GetSelectedChildren Method

Description

Retrieves the Microsoft Active Accessibility selected children of the current object.

Syntax

object.LegacyIAccessiblePattern.GetSelectedChildren

Return Type

A collection of UI Automation objects.

IMPORTANT

This method is available only if you implement the LegacyIAccessible pattern in an object in your application.

Back to top

GetSelectedChildren Method

Description

Retrieves all selected items from the container.

Syntax

object.SelectionPattern.GetSelectedChildren

Return Type

A collection of UI Automation objects.

IMPORTANT

This method is available only if you implement the Selection pattern in an object in your application.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

GetState Method

Description

Retrieves the Microsoft Active Accessibility state for the current object.

Syntax

object.LegacyIAccessiblePattern.GetState

Return Type

The accessibility state. For possible values, see AccessibleState values.

In the legacy UIA Pro Add-in: An Integer value.

In the enhanced Beta UIA Pro Add-in: A String value.

IMPORTANT

This method is available only if you implement the LegacyIAccessible pattern in an object in your application.

Back to top

GetSupportedSelectionMode Method

Description

Indicates the type of text selection that is supported by the control.

Syntax

object.TextPattern.GetSupportedSelectionMode

Return Type

In the legacy UIA Pro Add-in: An Integer value. One of the numbers defined below.

In the enhanced Beta UIA Pro Add-in: A String value. One of the enumeration strings described below.

Possible values:

  • 0 = "None". No text selection supported.

  • 1 = "Single". Supports a single and continuous text selection.

  • 2 = "Multiple". 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.

Back to top

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.

Back to top

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.

In the legacy UIA Pro Add-in: An Integer value. One of the numbers defined below.

In the enhanced Beta UIA Pro Add-in: A String value. One of the enumeration strings described below.

Possible values:

  • 0 = "Off". The UI Automation element is not selected, checked, marked, or otherwise activated.

  • 1 = "On". The UI Automation element is selected, checked, marked, or otherwise activated.

  • 2 = "Indeterminate". The UI Automation element is in an indeterminate state. For example, a check box is checked and dimmed.

IMPORTANT

This method is available only if you implement the Toggle pattern in an object in your application.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

GetVisibleText Method

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.

Back to top

GetWindowInteractionState Method

Description

Retrieves the interaction state of the window.

Syntax

object.WindowPattern.GetWindowInteractionState

Return Type

In the legacy UIA Pro Add-in: An Integer value. One of the numbers defined below.

In the enhanced Beta UIA Pro Add-in: A String value. One of the enumeration strings described below.

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.

Back to top

GetWindowVisualState Method

Description

Retrieves the visual state of the window.

Syntax

object.WindowPattern.GetWindowVisualState

Return Type

In the legacy UIA Pro Add-in: An Integer value. One of the numbers defined below.

In the enhanced Beta UIA Pro Add-in: A String value. One of the enumeration strings described below.

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

IsReadOnly Property

Description

Indicates whether the value of the control is read-only.

Syntax

object.ValuePattern.IsReadOnly

object.RangeValuePattern.IsReadOnly

Return Type

A value of Boolean type.

IMPORTANT

This property is available only if you implement the Value or RangeValue pattern in an object in your application.

Back to top

IsSelected Property

Description

Indicates whether an object is selected.

Syntax

object.SelectionItemPattern.IsSelected

Return Type

A value of Boolean type.

IMPORTANT

This property is available only if you implement the SelectionItem pattern in an object in your application.

Back to top

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.

Back to top

IsTopMost Property

Description

Indicates whether the window is set to always be displayed in front of other windows, even when it's not the active window.

Syntax

object.WindowPattern.IsTopMost

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

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.

Back to top

Scroll Method

Description

Scrolls the visible region of the content area horizontally and vertically.

Syntax

object.ScrollPattern.Scroll horiztonalAmount, verticalAmount

Arguments

ParameterDescription
horizontalAmount

Required. A predefined value.

The horizontal direction and increment size to use for the scroll. 

Possible values:

  • 0 = SmallIncrement. Move the scroll bar one small step to the right
  • 1 = LargeIncrement. Move the scroll bar one large step to the right
  • 2 = SmallDecrement. Move the scroll bar one small step to the left
  • 3 = LargeDecrement. Move the scroll bar one large step to the left
verticalAmount

Required. A predefined value.

The vertical direction and increment size to use for the scroll.

Possible values:

  • 0 = SmallIncrement. Scroll one small step downwards
  • 1 = LargeIncrement. Scroll one large step downwards
  • 2 = SmallDecrement. Scroll one small step upwards
  • 3 = LargeDecrement. Scroll one large step upwards

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.

Back to top

ScrollHorizontal Method

Description

Scrolls the visible region of the content area horizontally.

Syntax

object.ScrollPattern.ScrollHorizontal horiztonalAmount

Arguments

ParameterDescription
horizontalAmount

Required. A predefined value.

The horizontal direction and increment size to use for the scroll. 

Possible values:

  • 0 = SmallIncrement. Move the scroll bar one small step to the right
  • 1 = LargeIncrement. Move the scroll bar one large step to the right
  • 2 = SmallDecrement. Move the scroll bar one small step to the left
  • 3 = LargeDecrement. Move the scroll bar one large step to the left

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.

Back to top

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.

Back to top

ScrollIntoView Method

Description

Scrolls a text control to bring the specified area into view.

Syntax

object.TextPattern.ScrollIntoView(numberOfUnits, [unitType], [Direction], [Alignment])

Arguments

ParameterDescription
numberOfUnits

An integer. The number of text units to scroll.

unitType

Optional. The text unit type.

Possible values:

  • 0: TextUnit_Line (default)

  • 1: TextUnit_Page

Direction

Optional. The direction in which to scroll.

Possible values:

  • 0: Direction_Forward (default)

  • 1: Direction_Backward

Alignment

Optional. Indicates whether to display the text on the top or bottom of the object.

Possible values:

  • 0: Alignment_Top (default)

  • 1: Alignment_Bottom

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.

Back to top

ScrollVertical Method

Description

Scrolls the visible region of the content area vertically.

Syntax

object.ScrollPattern.ScrollVertical verticalAmount

Arguments

ParameterDescription
verticalAmount

Required. A predefined value.

The vertical direction and increment size to use for the scroll.

Possible values:

  • 0 = SmallIncrement. Scroll one small step downwards
  • 1 = LargeIncrement. Scroll one large step downwards
  • 2 = SmallDecrement. Scroll one small step upwards
  • 3 = LargeDecrement. Scroll one large step upwards

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.

Back to top

Select Method

Description

Selects the specified text in the object.

Syntax

object.TextPattern.Select(startIndex, length)

Arguments

ParameterDescription
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.

Back to top

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.

Back to top

Select Method

Description

Selects the element.

Syntax

object.LegacyIAccessiblePattern.Select(SelectOptions selectionOptions)

Arguments

ParameterDescription
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.

Back to top

SelectAll Method

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.

Back to top

SelectCell Method

Description

Selects a cell in the grid.

Syntax

object.GridPattern.SelectCell rowIndex, columnIndex

Arguments

ParameterDescription
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.

Back to top

SelectRow Method

Supported when using the enhanced UIA Pro Add-in (Beta).

Description

Selects a row in the grid.

Syntax

object.GridPattern.SelectRow rowIndex

Arguments

ParameterDescription
rowIndex

Required. An integer.

The cell row index.

Return Type

None

IMPORTANT

This method is available only if you implement the Grid pattern in an object in your application.

Back to top

SetCellValue Method

Description

Sets the specified cell’s value using the Value pattern.

Syntax

object.GridPattern.SetCellValue(int rowIndex, int columnIndex, string cellValue)

Arguments

ParameterDescription
rowIndex

Required. An integer.

The cell row index.

columnIndex

Required. An integer.

The cell column index.

cellValueThe 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.

Back to top

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

ParameterDescription
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.

Back to top

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 horiztonalPercent, verticalPercent

Arguments

ParameterDescription
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.

Back to top

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.

Back to top

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.

Back to top

SetSecureValue Method

Description

Sets the encoded Microsoft Active Accessibility value for the current object.

Syntax

object.LegacyIAccessiblePattern.SetSecureValue Text

Arguments

ParameterDescription
Text

Required. A string.

The encoded value to set.

Return Type

None

IMPORTANT

  • This method is available only if you implement the LegacyIAccessible pattern in an object in your application.

  • The encoded text you specify is decoded during the test run.

  • To find the encoded value to use as the argument for the this method, do one of the following: 

    • Use the Password Encoder utility (available from the Windows Start menu).

    • Parameterize the argument using a Data Table parameter and use the Data Table encryption option (right-click each unencrypted value in the password column and choose Data > Encrypt).

    For more information, refer to the OpenText Functional Testing User Guide.

  • While the SetSecureValue method enables you to hide passwords on the screen during a run session, it is not intended to be a secure way to protect password information.

Back to top

SetSecureValue Method

Description

Sets the encoded value of the UI Automation element.

Syntax

object.ValuePattern.SetSecureValue Text

Arguments

ParameterDescription
Text

Required. A string. The encoded value to set.

Return Type

None

IMPORTANT

  • This method is available only if you implement the Value pattern in an object in your application.

  • The encoded text you specify is decoded during the test run.

  • To find the encoded value to use as the argument for the this method, do one of the following: 

    • Use the Password Encoder utility (available from the Windows Start menu).

    • Parameterize the argument using a Data Table parameter and use the Data Table encryption option (right-click each unencrypted value in the password column and choose Data > Encrypt).

    For more information, refer to the OpenText Functional Testing User Guide.

  • While the SetSecureValue method enables you to hide passwords on the screen during a run session, it is not intended to be a secure way to protect password information.

Back to top

SetValue Method

Description

Sets the value of the UI Automation element.

Syntax

object.ValuePattern.SetValue valueToSet

Arguments

ParameterDescription
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.

Back to top

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

ParameterDescription
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.

Back to top

Toggle Method

Description

Cycles through the toggle states of the control.

Syntax

object.ToggleValuePattern.Toggle

Return Type

None

IMPORTANT

This method is available only if you implement the Toggle pattern in an object in your application.

Back to top

WaitForInputIdle Method

Description

Waits until the window is ready for input or the timeout expires.

Syntax

object.WindowPattern.WaitForInputIdle milliseconds

Arguments

ParameterDescription
milliseconds

Required. An Integer.

The number of milliseconds to wait for the object to become ready.

Return Type

In the legacy UIA Pro Add-in: None

In the enhanced Beta UIA Pro Add-in: A Boolean value. True if the window is ready for input, False if the timeout expired.

IMPORTANT

This method is available only if you implement the Window pattern in an object in your application.

Back to top

See also: