Dropdown Methods
OpenDropdownList
Opens the dropdownList and returns a rectangle for the list (based on rectangle with changes after expanding dropdown list)
Syntax:
Exceptions:
Exception
Condition
When the dropdown could not be found on the screen.
When the dropdown could not be opened after the configured amount of retries.
SelectImage
Opens the dropdown list, searches the imageReference in the list (incl. scrolling) and selects it. If the image cannot be found, throws a TestStepAbortedException.
The dropdown list is an ItemList<Row> with an IScroller given by the AppBasics.GetScroller passed to the constructor of the dropdown.
Syntax:
Parameters:
Parameter
Description
imageReference
Exceptions:
Exception
Condition
When the dropdown could not be found on the screen.
When the dropdown could not be opened after the configured amount of retries.
When the image cannot be found in the dropdown list.
SelectOnScreenElement
Opens the dropdown list, searches for the element in the list (incl. scrolling) and selects it. If the image cannot be found, throws a TestStepAbortedException.
The dropdown list is an ItemList<Row> with an IScroller given by the AppBasics.GetScroller passed to the constructor of the dropdown.
Syntax:
Parameters:
Parameter
Description
element
Exceptions:
Exception
Condition
When the dropdown could not be found on the screen.
When the dropdown could not be opened after the configured amount of retries.
When the element cannot be found in the dropdown list.
SelectValue
Opens the dropdown list, searches the text value in the list (incl. scrolling) and selects it. If the text cannot be found, throws a TestStepAbortedException.
The dropdownlist is an ItemList<Row> with an IScroller given by the AppBasics.GetScroller passed to the constructor of the dropdown.
Syntax:
Parameters:
Parameter
Description
value
Exceptions:
Exception
Condition
When the dropdown could not be found on the screen.
When the dropdown could not be opened after the configured amount of retries.
When the text value cannot be found in the dropdown list.
VerifySelectedValue
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.
Syntax:
Parameters:
Parameter
Description
value
[actualValue]
Return Value:
Whether or not the text value could be found in the dropdown textbox.
Exceptions:
Exception
Condition
When the dropdown could not be found on the screen.
VerifyValueInList
Opens the dropdown list and verifies if the provided value is present in the dropdown list (includes scrolling). Closes the dropdown list again.
The dropdown list is an ItemList<Row> with an IScroller given by the AppBasics.GetScroller passed to the constructor of the dropdown.
Syntax:
Parameters:
Parameter
Description
value
[takeScreenshot]
When true, a screenshot of the expanded dropdown is taken, showing the value to verify.
Return Value:
Whether or not the text value could be found in the dropdown textbox.
Exceptions:
Exception
Condition
When the dropdown could not be found on the screen.
When the dropdown could not be opened after the configured amount of retries.
Last updated
Was this helpful?