Version

Using PivotGrid Control Proxy

Purpose

This topic explains sub items, independent verification points and the behavior of the WinPivotGrid™ control proxy represented by the UltraPivotGridTestObject object.

Supported sub items

Location sub item

The different drop areas of interaction are: Filters , Measures , Rows and Columns all of which are recorded as AtLocation with the appropriate location identifier as listed below:

  • GridTable().Click(AtLocation("FilterDropArea"))

  • GridTable().Click(AtLocation("MeasureDropArea"))

  • GridTable().Click(AtLocation("RowDropArea"))

  • GridTable().Click(AtLocation("ColumnDropArea"))

Using PivotGrid Control Proxy 1.png

Button sub item

There are four button types that interact with the PivotGrid and each of them is recognized as AtButton(“[button name]”).

Button Type Description

Filter button

Recorded as: AtButton("Filter")

Remove button

Recorded as: AtButton("Remove")

Scroll left

Recorded as: AtButton("Left")

Scroll right

Recorded as: AtButton("Right")

Scroll button

Recorded as: AtButton("Sort")

Using PivotGrid Control Proxy 2.png

Text sub item

Records all data source fields in the different drop area ( Filters , Measures , Rows , and Columns ) as “AtText” with the column caption visible as the identifier.

Note
Note:

Since each field is a child of the drop area in which it resides, the “AtText” sub item will be part of a list of sub-items. With the first sub item in the list represents the drop area, while the second sub item represents the clicked field.

Example 1:

In the above screenshot, clicking the “ Model Name ” Element in the column drop area will be recorded as:

GridTable().Click(AtList(AtLocation("ColumnDropArea"), AtText("Model Name")))

Example 2:

In the above screenshot, clicking on the “ Country ” element inside the Filter drop area will be recorded as:

GridTable().Click(AtList(AtLocation("FilterDropArea"), AtText("Country")))

Example 1:

Clicking the “ Category ” field filter button in the column drop area records as illustrated in the screenshot below:

Using PivotGrid Control Proxy 3.png
GridTable().Click(AtList(AtLocation("ColumnDropArea"), AtText("Category"), AtButton("Filter")))

Example 2:

Clicking the “ Scroll Right ” button in the measure drop area records as illustrated below the screenshot:

Using PivotGrid Control Proxy 4.png
GridTable().Click(AtList(AtLocation("MeasureDropArea"), AtButton("Right")))

Cell sub item

Records the Cells in the WinPivotGrid in the following format:

GridTable().Click(AtCell(AtRow(AtIndex([Row Index])), AtColumn(AtIndex([Column Index]))))

For example, the following script replays a click on the second cell in the first row of the PivotGrid.

GridTable().Click(AtCell(AtRow(0), AtColumn(1)))

Row/Column headers sub item

Records the actions on the row and column headers’ values as “AtList” sub items. The recording process begins by identifying the area as a location ( i.e. ,AtLocation("RowHeader")” or “AtLocation("ColumnHeader")”). The next step in the recording process, based on the depth of the header hierarchy, is to add a list of nested “AtText” sub items. Finally, if performing the action over the Header element’s expansion indicator, the process adds a “PLUS_MINUS” Location sub item to the end of the list.

Consider the following script examples referencing the screenshot below.

Clicking on the expansion indicator of “ H2 CY 20002 ” records the row header as:

GridTable().Click(AtList(new Subitem() { AtLocation("RowHeader"), _
            AtText("All Periods"), _
            AtText("CY 2002"), _
            AtText("H2 CY 2002"), _
            PLUS_MINUS }))

Clicking on the summary row header area labeled “ CY 20002 ” records as:

GridTable().Click(AtList(AtLocation("RowHeader"), _
AtText("All Periods"), AtText( "CY 2002", 1)))

Note:{label} Adds an index to the “AtText” representing the index of the instance since the summary header has the same caption as the previous one at the same hierarchy level.

Clicking “ Bike Wash ” Column header element will record as:

GridTable().Click(AtList(AtLocation("ColumnHeader"), AtText("All Products"), AtText("All Products"), AtText("Bike Wash")))
Using PivotGrid Control Proxy 5.png

Supported verification points

Columns

Display a list of the data source fields added to the columns drop area using captions .

Note
Note:

This Verification Point only lists the field’s caption and not its values.

Column headers

Displays column headers values in a tree structure, as illustrated in the following screenshots where double-clicking on each node opens up its property listing for each header item showing their various properties of the header items:

Using PivotGrid Control Proxy 6.png

Rows

Displays a list of the data source fields added to the rows drop area using captions .

Note
Note:

This Verification Point only lists the field’s caption and not its values.

Rows headers

Similar to the column header Verification Point displaying row headers items in a tree structure. Each node, when double-click opens up on each header item’s properties list showing its unique properties as illustrated in the following screenshot.

Using PivotGrid Control Proxy 7.png

Table contents

This Verification Point displays cell contents in a table structure that includes column headers and the row headers values. Use the “rowHeaders” property to verify these values as illustrated in the following screenshot.

Using PivotGrid Control Proxy 8.png

Measures

Displays a list of the data source fields added to the measures drop area using captions .

Filters

Displays a list of the data source fields added to the filters drop area using captions .

Current active cell

Displays the currently active cell’s properties, displaying the value of each individual property in the table on the left side of the Verification Point wizard window; as illustrated in the following screenshot:

Using PivotGrid Control Proxy 9.png

Supported actions

Resize

This method records the Resize action whenever users resize a column header, either by dragging or by double clicking the header element’s edge. The action signature is:

Resize([Column header sub item], [new width], [new height])

For example, the resize action in the following screenshot will be recorded as:

UltraPivotGrid1Table().Resize(AtList(AtLocation("ColumnHeader"), AtText("All Periods"), AtText("CY Q1")), 182, 25)

Before resizing

Using PivotGrid Control Proxy 10.png

After resizing

Using PivotGrid Control Proxy 11.png

Data selector

The data selector supports actions on data selector elements such as tree nodes while the dropdown buttons on the combo control are test object that record and replay actions.