Version

xamMonthCalendar - Recordable Methods

Topic Overview

Purpose

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

xamMonthCalendar Test Object Recordable Methods Summary

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

Adds dates into a collection of selected dates.

Adds and then removes dates from a collection of selected dates.

Removes dates from a collection of selected dates.

Scrolls the calendar to make the specified date visible.

AddSelectedDates Method

Description

The AddSelectedDates method records and replays the multiple dates selection.

Details

The method records the selected dates while the Shift key is pressed.

When it is replayed, the method validates the selected dates and adds them to a selected dates’ collection.

Parameters

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

Method Parameter Description

Array of dates to be added

The dates have to be formatted in the following way: mm/dd/yyyy .

Example

Adding two dates in the selection:

WpfWindow("MainWindow").XamMonthCalendar("xamMonthCalendar").AddSelectedDates ARRAY(1/3/2012, 1/4/2012)

Default setting

No default settings.

Possible exceptions

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

Exception name Exception description Possible reasons

The specified value is not a DateTime

The method expects a DateTime type parameter.

The method parameter is not valid.

The following CalendarItem was not found.

The specified parameter cannot be found.

The method parameter is not valid.

ChangeSelectedDates Method

Description

The ChangeSelectedDates method records and replays the changing of existings selection of muliple dates in the xamMonthCalendar control. It is used to perform adding and removing of dates in a selection in one step.

Details

This method is recorded when the user performs the following actions:

  1. Ctrl + click in a range of already selected dates to mark a starting date for a new selection.

  2. Shift + drag to select a new range of dates.

When replayed, the method validates the selected dates, adds and removes them accordingly from collection of selected dates.

Parameters

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

Method Parameter Description
  • Array of dates to be added

  • Array of dates to be removed

The dates in the arrays have to be formatted in the following way: mm/dd/yyyy. The dates to be added are listed as the first parameter and the dates to be removed – as the second parameter.

Example

Changing the xamMonthCalendar dates selection:

WpfWindow("MainWindow").XamMonthCalendar("xamMonthCalendar").ChangeSelectedDates ARRAY(1/11/2012), ARRAY(1/9/2012, 1/12/2012, 1/13/2012)

Default setting

No default settings.

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 specified value is not a DateTime

The method expects a DateTime type parameter.

The method parameter is not valid.

The following CalendarItem was not found.

The specified parameter cannot be found.

The method parameter is not valid.

RemoveSelectedDates Method

Description

The RemoveSelectedDates method records and replays the removal of muliple dates from a selected dates’ collection.

Details

The method records the selected dates to be removed while the Shift key is pressed.

When it is replayed, the method validates the selected dates and removes them from a selected dates’ collection.

Parameters

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

Method Parameter Description

Array of dates to be removed

(default)

The dates have to be formatted in the following way: mm/dd/yyyy .

Example

Removing the two dates from the dates selection:

WpfWindow("MainWindow").XamMonthCalendar("xamMonthCalendar").RemoveSelectedDates ARRAY(1/3/2012, 1/4/2012)

Default setting

No default settings.

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 specified value is not a DateTime

The method expects a DateTime type parameter.

The method parameter is not valid.

The following CalendarItem was not found.

The specified parameter cannot be found.

The method parameter is not valid.

ScrollToDate Method

Description

The ScrollToDate method records and replays the click action on the xamMonthCalendar header’s scroll buttons until the specified date is visible.

Details

No additional details.

Parameters

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

Method Parameter Description

Specified date

The specified date must be in the following format: mm/dd/yyyy .

Example

Scrolling to the specified date and clicking on it:

WpfWindow("MainWindow").XamMonthCalendar("xamMonthCalendar").ScrollToDate 3/10/2012

WpfWindow("MainWindow").XamMonthCalendar("xamMonthCalendar").ClickSubItem calItem, 3/10/2012, igAt, 10.16,8.12

Default setting

No default setting.

Possible exceptions

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

Exception name Exception description Possible reasons

The specified value is not of DateTime type.

The method expects a DateTime type parameter.

The method parameter is not valid.

The following CalendarItem was not found.

The specified parameter cannot be found.

The method parameter is not valid.

Related Topics

The following table lists other topics you may find useful.

Topic Purpose

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

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

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

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

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