Testing_Selenium::select

Select an option from a drop-down using an option locator.

<p> Option locators provide different ways of specifying options of an HTML Select element (e.g. for selecting a specific option, or for asserting that the selected option satisfies a specification). There are several forms of Select Option Locator. </p> <ul> <li> <b>label</b>=<i>labelPattern</i>: matches options based on their labels, i.e. the visible text. (This is the default.) <ul> <li> label=regexp:^[Oo]ther </li> </ul> </li> <li> <b>value</b>=<i>valuePattern</i>: matches options based on their values. <ul> <li> value=other </li> </ul> </li> <li> <b>id</b>=<i>id</i>: matches options based on their ids. <ul> <li> id=option1 </li> </ul> </li> <li> <b>index</b>=<i>index</i>: matches an option based on its index (offset from zero). <ul> <li> index=2 </li> </ul> </li> </ul><p> If no option locator prefix is provided, the default behaviour is to match on <b>label</b>. </p>