This topic explains sub items, independent verification points and the behavior of the WinPivotGrid™ control proxy represented by the UltraPivotGridTestObject object.
This topic contains the following sections:
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"))
There are four button types that interact with the PivotGrid and each of them is recognized as AtButton(“[button name]”)
.
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.
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")))
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")))
Clicking the “ Category ” field filter button in the column drop area records as illustrated in the screenshot below:
GridTable().Click(AtList(AtLocation("ColumnDropArea"), AtText("Category"), AtButton("Filter")))
Clicking the “ Scroll Right ” button in the measure drop area records as illustrated below the screenshot:
GridTable().Click(AtList(AtLocation("MeasureDropArea"), AtButton("Right")))
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)))
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")))
Display a list of the data source fields added to the columns drop area using captions .
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:
Displays a list of the data source fields added to the rows drop area using captions .
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.
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.
Displays a list of the data source fields added to the measures drop area using captions .
Displays a list of the data source fields added to the filters drop area using captions .
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:
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
After resizing
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.