Version

xamTabControl - Recordable Methods

Topic Overview

Purpose

This topic provides reference information about the recordable user methods for testing the xamTabControl™.

In this topic

This topic contains the following sections:

xamTabControl Test Object Recordable Methods

Recordable methods summary chart

The following table briefly explains the recordable methods for testing the control. Detailed information about the methods is provided in the text blocks following the table.

Method Description

Closes a specific tab.

Moves a specific tab.

Selects a specific tab.

CloseTab

Description

The CloseTab method closes the current tab. It is used for recording and replaying the tab closing action performed by the user (clicking the Close button of the tab).

Details

The method accepts as a parameter a tab identifier which can be the tab header text or the tab index.

When recording is performed and there are duplicating tab headers’ texts, the tab index is used.

Parameters

The following table explains the method’s parameters along with some sample code.

Method Parameter Description

Tab header text

(default)

Using the tab header text as a parameter.

Example

Closing the first tab with header Tab1 in xamTabControl:

WpfWindow("MainWindow").XamTabControl("xamTabControl1").CloseTab "Tab1"

Tab index

Using the tab index as a parameter.

Example

Closing the first tab with index 0 in xamTabControl:

WpfWindow("MainWindow").XamTabControl("xamTabControl1").CloseTab 0

Default setting

The tab closing action is recorded with the tab header text passed as a parameter.

Possible exceptions

The following table lists the possible exceptions for the method and the reason that is likely causing them.

Exception name Exception description Possible reasons

The following item was not found.

The selected tab cannot be located when replaying the method.

  • The tab has been closed already.

  • The tab doesn’t exist.

MoveTab

Description

The MoveTab method moves a specific tab to a new location. It is used for recording and replaying the tab moving action performed by the user (by dragging and dropping a tab item).

Details

The method accepts as a parameter an index of the tab item being moved, an index of the new tab item location and the drop location relative to the new tab item location. The relative drop location can be left or right from the target location index.

Parameters

The following table explains the method’s parameters along with some sample code.

Method Parameter Description
  • Tab item index

  • New tab item location index

  • Drop location

The following example will move tab item with index 3 to the right side of the location with index 6.

Example

WpfWindow("MainWindow").XamTabControl("xamTabControl1").MoveTab 3, 6, "RightOfTarget"

Default setting

No default settings.

Possible exceptions

No known exceptions.

Select

Description

The Select method selects a tab. It is used for recording and replaying the tab selection action performed by the user.

Details

The method accepts as a parameter a tab identifier which can either be the tab header text or the tab index.

When recording is performed and there are duplicating tab headers’ texts, the tab index is used.

Parameters

The following table explains the method’s parameters along with some sample code.

Method Parameter Description

Tab header text

(default)

Using the tab header text as a parameter.

Example

Selecting the first tab with header “Tab1” in xamTabControl:

WpfWindow("MainWindow").XamTabControl("xamTabControl1").Select "Tab1"

tab index

Using the tab index as a parameter.

Example

Selecting the first tab with index 0 in xamTabControl:

WpfWindow("MainWindow").XamTabControl("xamTabControl1").Select 0

Default setting

The tab selection action is recorded with the tab header text passed as a parameter.

Possible exceptions

The following table lists the possible exceptions for the method and the reason that is likely causing them.

Exception name Exception description Possible reasons

The following item was not found.

The selected tab cannot be located when replaying the method.

  • The tab has been closed already.

  • The tab doesn’t exist.

Related Content

Topics

The following table lists other topics you may find useful.

Topic Purpose

This topic provides information about the user actions of the xamTabControl™ which you can test and the elements you can inspect.

This topic provides reference information about the replay-only user methods for testing the XamTabControl™.

This topic provides reference information about the inspectable test object properties of the xamTabControl™.

This topic provides reference information about the proxy class that supports the testing of the xamTabControl™ in Micro Focus Unified Functional Testing software.