Links

Dropdown

Description

The Dropdown class represents UI elements that are consisting of a text field (which can be editable or not) and a dropdown list that can be expanded by clicking in the text field or on an optional dropdown button. The dropdown list can include a scroller to scroll through the possible selections. The dropdown is identified on the screen by the Hotspot of the image given in the constructor, which should be placed within the text field. If there is no closed border around the text field, this implementation will not support this dropdown type.
The Dropdown object uses a TextBox object, a Button object and an ItemList with an optional Scroller.
Namespace: Progile.TRIO.BaseModel Assembly: Progile.TRIO.BaseModel (in Progile.TRIO.BaseModel.dll)

Inheritance Hierarchy:

Object Progile.TRIO.BaseModel.OnScreenElement Progile.TRIO.BaseModel.Dropdown

Constructors

Creates a new Dropdown instance. Dropdown Textbox will be defined by the visible closed border around the Hotspot of the provided image. If an image for the Dropdown button is provided, it will be used to open the dropdown list, otherwise the dropdown is opened simply by clicking in the textbox.
Syntax:
public Dropdown(
IAppBasics appBasics,
string displayName,
ImageReference imageReference,
ImageReference listBottomImage,
ImageReference buttonImage = null,
params IImageFilter[] filters
)
Parameter
Description
appBasics
The interface for the AppBasics, that is available on every BaseScreen. Allows access to the testerinterface and the application window.
displayName
Type: String The name of the element that will be used for logging and reporting of exceptions (customer facing).
imageName
Type: ImageReference The image that will be used to locate the Dropdown on the screen. The Hotspot of the image must be set within the dropdown textbox.
listBottomImage
Type: ImageReference The image that defines the bottom of the expanded dropdown list. It will be used to define the search rectangle to find an element in the dropdown list.
Often the listBottomImage is the same (or same collection of images) for any given
[buttonImage]
Type: ImageReference The image that defines the dropdown button to expand the dropdown. For many dropdown simply clicking in the textbox expands the dropdown list, in this case the buttonImage can be left null.
[filters]
Type: IImageFilter[ ] Typically a Select filter indicating the area of interest for the image search.

Methods

Name
Description
Opens the dropdownlist, searches the image in the list (incl. scrolling) and selects it. If the image cannot be found, throws a TestStepAbortedException.
Opens the dropdownlist, searches the text value in the list (incl. scrolling) and selects it. If the text cannot be found, throws a TestStepAbortedException.
Verifies if the value that is currently set in the textbox matches the expected value. If it doesn't, the value read from the TextBox is returned as the actualValue out parameter.
Opens dropdownlist and verifies if the provided value is present in the dropdown list (includes scrolling). Closes dropdownlist again.

Properties

Name
Description
The dropdown button used to open the dropdownList. Either coming from provided buttonImage in Dropdown ctor or just the Textbox itself (works in most dropdowns).
The image detection parameters that are used to find an image entry in the dropdown list.
The ocr parameters that are used to find a text entry in the dropdown list. By default also this paras are used to verify a selected element, but TextBox.TextBoxOcrParas can be set separately.
Determines whether the mouse should be moved in the middle of the dropdownlist in order to focus the scroller of the list. Can cause problems with list entries that have tooltips. Default: false
TextBox
Textbox of the dropdown. Is also used to define the dropdown list. Rectangle of TextBox is defined when first used by visible closed border around the Hotspot of the provided image.