Skip to main content

[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
ParameterParameter TypeRequiredDescription
toTestObjectYesRepresents a web element.
rangeObjectYesList of indexes of the options to be verified if being.
timeoutintYesSystem will wait at most timeout (seconds) to return result.
flowControlFailureHandlingOptionalSpecify failure handling schema to determine whether the execution should be allowed to continue or stop.

Returns

Parameter TypeDescription
Boolean
  • true if options with given indices are selected.
  • false if options with given indices are not selected.

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)
Was this page helpful?