Select

The selector command instructs selenium to pick a specific option from a drop down menu. The drop down selection is done using an Element Locator while the exact option to pick is done using the Option Locator.

Required Attributes
selectLocator
Element Locator to identify the drop down.
optionLocator
Option Locator to identify the exact option to choose.
Usage Examples
Example #1
<selenium baseurl="http://www.google.com">
   
<open url="/finance" windowID="test" />
   
<waitForPageToLoad timeout="30000" />
   
<type locator="q" value="GOOG" />
   
<click locator="//input[@value='Get quotes']" />
   
<waitForPageToLoad timeout="30000" />
   
<log>Toggling between a few drop down options</log>
   
<select optionLocator="Most Recent Annual" selectLocator="id=related-select" />
   
<sleep time="1s" />
   
<select optionLocator="Most Recent Quarter" selectLocator="id=related-select" />
   
<sleep time="1s" />
   
<select optionLocator="Most Recent Annual" selectLocator="id=related-select" />
</selenium>