Version

Using WinCarousel Control Proxy

Purpose

This topic explains about the SubItems, different verification points, and behavior of the WinCarousel™ control proxy represented by UltraCarouselTestObject object.

SubItems

Identifying carousel items

Carousel items are identified by Text , Name , Position , and Index . Priority in recording for the carousel items is:

  1. Text (If not empty)

  2. Name (If not empty)

  3. Position . If the carousel buttons are not visible, it will record identified by Index instead of Position.

Note
Note:

scrolling with the mouse wheel is not supported, and using Position does not scroll an item into view.

Button subitem

There are six possible scroll buttons for the Carousel control allowing to scroll items along the path. Each button is recognized as AtButton (“[button name]”).

Button Type Description
  1. Scroll button

Recorded as: AtButton`(“`FirstItem`”)`

  1. Scroll button

Recorded as: AtButton`(“`PreviousPage`”)`

  1. Scroll button

Recorded as: AtButton`(“`PreviousItem`”)`

  1. Scroll button

Recorded as: AtButton`(“`NextItem`”)`

  1. Scroll button

Recorded as: AtButton`(“`NextPage`”)`

  1. Scroll button

Recorded as: AtButton`(“`LastItem`”)`

Using WinCarousel Control Proxy 1.png

Text subitem

Text subitem references the Text property of the carousel item, which if specified, refers to the visible text on the carousel item. If more than one instance of the CarouselItem is visible it will interact with the first one on the path. Also if the item is not currently visible it will be scrolled into view.

Carousel1ComboListBox().Click(AtText("Item1"))

Carousel1ComboListBox().Click(AtText("Item1", 1)) ' Click the second instance of Item1

Name subitem

Name subitem references the Key property of the carousel item, which can contain duplicates on value null as it is not required to be set. If more than one instance of the CarouselItem is visible it will interact with the first one on the path. Also if the item is not currently visible it will be scrolled into view.

Carousel1ComboListBox().Click(AtName("Key1"))

Carousel1ComboListBox().Click(AtName("", 1)) ' Click the second instance of an empty key

Position subitem

Position subitem refers to the visible position of the carousel item along the path. It is a zero-based index, based on the visible carousel item UIElement sorted on the ItemInfo.Position property which is an internal property on the UIElement to state where it is on the path. You can also use this if you need to click on a particular instance of a carousel item that appears multiple times along a path.

Carousel1ComboListBox().Click(AtPosition(3))

Index subitem

Index subitem refers to the zero-based index of the carousel item in the items collection. If more than one instance of the CarouselItem is visible it will interact with the first one on the path. Also if the item is not currently visible it will be scrolled into view.

Carousel1ComboListBox().Click(AtIndex(0))

Verification Points

Table Contents

The Verification Point returns a table of data about all or currently visible carousel items using the VisibleCarouselItem and AllCarouselItems properties.

VisibleCarouselItem

Returns a table of data about the currently visible carousel items. The returned data consists of the following properties:

Property Description Type

Alpha

Representing alpha level of the carousel item.

Integer

Decimal

Representing the scale in percent of the original size of the carousel item.

Decimal

IsActive

Indicates if the item is currently the active item.

Boolean

IsSelected

Indicates if the item is the item is selected.

Boolean

Name

Carousel item’s Key property, which can be identified via Name subitem.

String

NameInstance

Indicates the index of the instance that the Name appears in the collection of all carousel items.

Integer

Scale

Representing the carousel item’s scale (In percent) of the original size.

Decimal

Position

Visible position of the carousel item, Zero-based index.

If item is not visible, it returns -1.

Integer

Rect

The rectangle of the carousel item representing relative coordinates.

Rect

Text

Carousel item’s Text property, which can be identified via Text subitem.

String

AllCarouselItems

Returns a table of data for all carousel items. The returned data consists of the following properties.

Property Description Type

Index

Visible position of the carousel item, Zero-based index.

Integer

IsActive

Indicates if the item is currently the active item.

Boolean

IsVisible

Indicates if the item is currently visible.

Boolean

Name

Carousel item’s Key property, which can be identified via Name subitem.

String

NameInstance

Indicates the index of the instance that the Name appears in the collection of all carousel items.

Integer

Position

Visible position of the carousel item, Zero-based index. If item is not visible, it returns -1.

Integer

Text

Carousel item’s Text property, which can be identified via Text subitem.

String

TextInstance

Indicates the index of the instance that the Text appears in the collection of all carousel items.

Integer