[WebUI] Verify Option Selected By Index
Description
Verify if the options at the given indices are selected.
Keyword name: verifyOptionSelectedByIndex
Parameters
- to - TestObject (required): represent a web element
- range - Object (required): list of indexes of the options to be verified if being
- timeout - int (requiredl): system will wait at most timeout (seconds) to return result
- flowControl - FailureHandling (optional): specify failure handling schema to determine whether the execution should be allowed to continue or stop. More details are in this page: Failure handling
Parameter | Parameter Type | Required | Description |
---|---|---|---|
to | TestObject | Yes | Represents a web element. |
range | Object | Yes | List of indexes of the options to be verified if being. |
timeout | int | Yes | System will wait at most timeout (seconds) to return result. |
flowControl | FailureHandling | Optional | Specify failure handling schema to determine whether the execution should be allowed to continue or stop. |
Returns
Parameter Type | Description |
---|---|
Boolean |
|
Example
You want to verify if Option 1 is selected in the list:
In Manual view:
WebUI.verifyOptionSelectedByIndex(findTestObject('The Second Landing Page/select_js-intent'), 1, 2)