Dropdown

Interacting with Dropdowns

Selection Types

A. Selecting Dropdown Values

Name Spec Data Types Description
selectByIndex optional [Number] Select Option by Index
selectByValue optional [String] Select Option by Option Value
selectByText optional [String] Select Value by Option Text

Example

  <select id="vehicles">
    <option value="opt-volvo">Volvo</option>
    <option value="opt-saab">Saab</option>
    <option value="opt-vw">VW</option>
    <option value="opt-audi">Audi</option>
  </select>

Select Option by Index

SELECT css("#vehicles option:selected") FROM http://www.delven.io/test/execute.html 
EVENTFLOW
{
  {
    "by-css" : "#vehicles",    
    "selectByIndex"  : 1
  }
}
{  "column_1" : {"key":"opt-volvo", "value" : "Volvo"} }

Select Option by Option Value

SELECT css("#vehicles option:selected")  FROM http://www.delven.io/test/execute.html 
EVENTFLOW
{
  {
    "by-css" : "#vehicles",    
    "selectByValue"  : "opt-audi"
  }
}
{  "column_1" : {"key":"opt-audi", "value" : "Audi"} }

Select Value by Option Text

SELECT css("#vehicles option:selected")  FROM http://www.delven.io/test/execute.html 
EVENTFLOW
{
  {
    "by-css" : "#vehicles",    
    "selectByText"  : "Saab"
  }
}
{  "column_1" : {"key":"opt-saab", "value" : "Saab"} }