Version

xamMonthCalendar - Replay-Only Methods

Topic Overview

Purpose

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

xamMonthCalendar Test Object Replay-Only Methods Summary

Replay-only methods summary chart

The following table briefly explains the replay-only methods for testing the control. Detailed information about the methods is provided below the table.

Method Description

Clicks on the xamMonthCalendar header.

Clicks on the specified calendar item.

Validates the calendar sub item and its location, brings it to view and clicks at the specified point.

ClickHeader Method

Description

This method replays the click user action on the specified header of the xamMonthCalendar control.

Details

Using this method, you can simulate the zooming out of the control.

Parameters

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

Method Parameter Description

Header text

( required )

This method takes a xamMonthCalendar header as a parameter, verifies that the specified text is the same as the current header and clicks on it.

Example

Clicking on the header and zooming out from Dates calendar mode to Months mode:

WpfWindow("MainWindow").XamMonthCalendar("xamMonthCalendar").ClickHeader "March, 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 Possible reasons

• The specified value is not a DateTime

• The following CalendarItem was not found.

The method parameter is not valid.

ClickCalendarItem Method

Description

This method replays the click action on a specified xamMonthCalendar item combined with pressing of a specified keyboard button.

Details

First, the specified calendar item is validated, then the item is brought into view and a specified key state is set. After that a click action is performed and the key state is reset.

The possible values for the key state are the following:

  • igShift

  • igAlt

  • igShiftAlt

  • igCtrl

  • igShiftCtrl

  • igAltCtrl

  • igShiftAltCtrl

Parameters

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

Method Parameter Description
  • Calendar item

( required )

  • Key state

( optional )

This method is using a calendar item and a key state to perform a click action.

Example

Clicking on two dates and pressing the CTRL key in order to add these dates to a selected dates collection:

WpfWindow("MainWindow").XamMonthCalendar("xamMonthCalendar").ClickCalendarItem 3/1/2011, igCtrl

WpfWindow("MainWindow").XamMonthCalendar("xamMonthCalendar").ClickCalendarItem 3/2/2011, igCtrl

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 Possible reasons

• The specified value is not a DateTime

• The following CalendarItem was not found.

The method parameter is not valid.

ClickSubItem Method

Description

This method is used for performing a click on a specified item at a specifed location. This method is common for most of the supported controls that have sub items.

Details

In the context of testing, the xamMonthCalendar the sub item type can take one of the following values:

calHdr (calendar header sub item type)

calItem (calendar item sub item type)

Parameters

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

Method Parameter Description
  • Sub Item Type

( R equired)

  • Sub Item

( R equired)

  • Region

(Optional)

  • X

(Optional)

  • Y

(Optional)

Example

  • Click on the calendar item “2011” when the current calendar mode is Years:

WpfWindow("MainWindow").XamMonthCalendar("xamMonthCalendar").ClickSubItem calItem, "2011", igAt, 28.64,19.04

  • Click on the calendar header “January, 2012” when the current calendar mode is Days to zoom out the calendar:

WpfWindow("MainWindow").XamMonthCalendar("xamMonthCalendar").ClickSubItem calHdr, "January, 2012", igAt, 103,13

Default setting

This method takes several parameters:

  • calendar sub item type

  • calendar sub item

  • region

  • coordinates of a point

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 point required to perform the operation is not visible.

The click location cannot be resolved.

The method parameters defining the point to click are 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 recordable 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 replay-only user methods for testing the xamEditors that are common to all these editors.