Version

xamEditors - Recordable Methods

Topic Overview

Purpose

This topic provides reference information about the recordable user methods for testing the xamEditors that are common to all these editors. For information about the editor-specific recordable user methods for a particular editor, see its respective topic. (Listed in the *

xamEditors Test Objects Recordable Methods

Supported editor controls

The methods covered in this topic apply to the following controls:

  • xamCheckEditor™

  • xamComboEditor™

  • xamCurrencyEditor™

  • xamDateTimeEditor™

  • xamMaskedEditor™

  • xamNumericEditor™

  • xamTextEditor™

Recordable methods summary

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

Clears the text in the editor.

Closes the editor’s drop-down list if it has one available.

Opens the editor’s drop-down list if it has one available.

Set

Sets the value property of the xamEditors.

Sets the editor text.

Set

Description

The Set method records and replays the setting of a value to an editor.

Details

No additional details.

Parameters

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

Method Parameter Description

The value to set

The value is of simple value type. The exact type depends on which xamEditor control is being used.

Example

Setting a value to the xamCheckEditor control. In this case, the value is True or False (= checked or unchecked, respectively):

WpfWindow("MainWindow").XamCheckEditor("xamCheckEditor").Set True

Setting a value to xamNumericEditor control. In this case, the value will be a numeric data:

WpfWindow("MainWindow").XamNumericEditor("xamNumericEditor").Set 15.42

Default setting

No default setting.

Possible exceptions

No known exceptions.

Clear

Description

The Clear method records and replays the clearing of the text in the editor.

Details

The method records the setting of the editor in Edit mode and the deleting of the text in it.

When replayed, the method validates whether the editor is in edit mode, selects the text, and then simulates pressing the Backspace key.

Parameters

No parameters are used with this method.

Example

Clear the text in the editor:

WpfWindow("MainWindow").XamTextEditor("xamTextEditor").Clear

Default setting

No default setting.

Possible exceptions

The following table lists the possible exceptions for the method and the reasons that are likely to be causing them.

Exception name Exception description Possible reasons

Action not allowed

Thrown if the method is replayed when the control is not enabled

The text editor is disabled.

Editing not allowed.

Editing is attempted while the control is not is not in Edit mode.

The text editor is read-only.

SetText

Description

The SetText method records and replays the adding of text to the text editor.

Details

The method records the setting of the editor in Edit mode and the adding of the new text.

When replayed, the method validates if the editor is in edit mode, selects the old text content, simulates deleting with the Backspace key and adds the new text.

Parameters

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

Method Parameter Description

The new text to add

The text string to add.

Example

Deleting the existing text and adding the new one:

WpfWindow("MainWindow").XamTextEditor("xamTextEditor").SetText "Another text string"

Default setting

No default setting.

Possible exceptions

The following table lists the possible exceptions for the method and the reasons that are likely to be causing them.

Exception name Exception description Possible reasons

Action not allowed

Thrown if the method is replayed when the control is not enabled

The text editor is disabled.

Editing is not allowed

Editing is attempted while the control is not is not in Edit mode.

The text editor is read-only.

DropDown

Description

The DropDown method records and replays the opening of an editor drop-down list if such a drop-down exists.

Details

The method records the clicking on the drop-down button.

When replayed, the method validates whether the editor is has a drop-down and opens it.

Parameters

No parameters are used with this method.

Example

Opening the drop-down in a xamDateTimeEditor control:

WpfWindow("MainWindow").XamDateTimeEditor("dateTimeEditor").DropDown

Default setting

No default setting.

Possible exceptions

The following table lists the possible exceptions for the method and the reasons that are likely to be causing them.

Exception name Exception description Possible reasons

Object cannot be dropped down.

The editor drop-down list can’t be opened.

The control “AllowDropDown” property is set to False .

CloseUp

Description

The CloseUp method records and replays the closing of an editor drop-down list if such a drop-down exists.

Details

The method records the clicking on the drop-down button.

When replayed, the method validates whether the editor has a drop-down and closes it.

Parameters

No parameters are used with this method.

Example

Closing the drop-down in a xamDateTimeEditor control:

WpfWindow("MainWindow").XamDateTimeEditor("dateTimeEditor").CloseUp

Default setting

No default setting.

Possible exceptions

The following table lists the possible exceptions for the method and the reasons that are likely to be causing them.

Exception name Exception description Possible reasons

Object cannot be dropped down.

The editor drop-down list can’t be opened.

The control “AllowDropDown” property is set to False .

Related Content

Topics

The following table lists other topics you may find useful.

Topic Purpose

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

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

This topic provides reference information about the replay-only user methods for testing the xamEditors that are common to all these editors.

This topic provides reference information about the test object properties of the xamEditors that are common to all these editors.

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