org.seleniumhq.selenium.fluent
Class FluentSelect

java.lang.Object
  extended by org.seleniumhq.selenium.fluent.Internal.BaseFluentWebDriver
      extended by org.seleniumhq.selenium.fluent.Internal.BaseFluentWebElement
          extended by org.seleniumhq.selenium.fluent.FluentWebElement
              extended by org.seleniumhq.selenium.fluent.FluentSelect

public class FluentSelect
extends FluentWebElement


Nested Class Summary
 
Nested classes/interfaces inherited from class org.seleniumhq.selenium.fluent.FluentWebElement
FluentWebElement.NegatingFluentWebElement
 
Nested classes/interfaces inherited from class org.seleniumhq.selenium.fluent.Internal.BaseFluentWebDriver
Internal.BaseFluentWebDriver.MultipleResult, Internal.BaseFluentWebDriver.SingleResult
 
Field Summary
 
Fields inherited from class org.seleniumhq.selenium.fluent.FluentWebElement
currentElement
 
Fields inherited from class org.seleniumhq.selenium.fluent.Internal.BaseFluentWebDriver
booleanInsteadOfNotFoundException, context, delegate, monitor
 
Constructor Summary
protected FluentSelect(org.openqa.selenium.WebDriver delegate, org.openqa.selenium.support.ui.Select currentSelect, org.openqa.selenium.WebElement currentElement, Context context, Monitor monitor, boolean booleanInsteadOfNoSuchElement)
           
protected FluentSelect(org.openqa.selenium.WebDriver delegate, org.openqa.selenium.WebElement currentElement, Context context, Monitor monitor, boolean booleanInsteadOfNoSuchElement)
           
 
Method Summary
 FluentSelect deselectAll()
          Clear all selected entries.
 FluentSelect deselectByIndex(int index)
          Deselect the option at the given index.
 FluentSelect deselectByValue(String value)
          Deselect all options that have a value matching the argument.
 FluentSelect deselectByVisibleText(String text)
          Deselect all options that display text matching the argument.
 List<org.openqa.selenium.WebElement> getAllSelectedOptions()
           
 org.openqa.selenium.WebElement getFirstSelectedOption()
           
 List<org.openqa.selenium.WebElement> getOptions()
           
protected  org.openqa.selenium.support.ui.Select getSelect()
           
 FluentSelect ifInvisibleWaitUpTo(Period period)
           
 boolean isMultiple()
           
 FluentSelect selectByIndex(int index)
          Select the option at the given index.
 FluentSelect selectByValue(String value)
          Select all options that have a value matching the argument.
 FluentSelect selectByVisibleText(String text)
          Select all options that display text matching the argument.
 FluentSelect within(Period period)
           
 
Methods inherited from class org.seleniumhq.selenium.fluent.FluentWebElement
abbr, abbr, abbrs, abbrs, acronym, acronym, acronyms, acronyms, actualFindElement, actualFindElements, address, address, addresses, addresses, area, area, areas, areas, b, b, blockquote, blockquote, blockquotes, blockquotes, bs, bs, button, button, buttons, buttons, clearField, click, div, div, divs, divs, fieldset, fieldset, fieldsets, fieldsets, figure, figure, figures, figures, findElement, findElements, footer, footer, footers, footers, form, form, forms, forms, getAttribute, getCssValue, getLocation, getSearchContext, getSize, getTagName, getText, getWebElement, h1, h1, h1s, h1s, h2, h2, h2s, h2s, h3, h3, h3s, h3s, h4, h4, h4s, h4s, has, hasMissing, header, header, headers, headers, img, img, imgs, imgs, input, input, inputs, inputs, isDisplayed, isEnabled, isSelected, label, label, labels, labels, legend, legend, legends, legends, li, li, link, link, links, links, lis, lis, map, map, maps, maps, nav, nav, navs, navs, object, object, objects, objects, ol, ol, ols, ols, option, option, options, options, p, p, pre, pre, pres, pres, ps, ps, sendKeys, span, span, spans, spans, submit, table, table, tables, tables, tbody, tbody, tbodys, tbodys, td, td, tds, tds, textarea, textarea, textareas, textareas, th, th, ths, ths, tr, tr, trs, trs, without
 
Methods inherited from class org.seleniumhq.selenium.fluent.Internal.BaseFluentWebElement
charSeqArrayAsHumanString, makeFluentWebElements
 
Methods inherited from class org.seleniumhq.selenium.fluent.Internal.BaseFluentWebDriver
assertTagIs, beforeFindElement, changeTimeout, executeAndWrapReThrowIfNeeded, fixupBy, getPeriod, newFluentWebElement, newFluentWebElements, resetTimeout, retryingFindIt, retryingFindThem, select, select, selects, selects, title, ul, ul, uls, uls, url, wrapAssertionError, wrapRuntimeException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FluentSelect

protected FluentSelect(org.openqa.selenium.WebDriver delegate,
                       org.openqa.selenium.WebElement currentElement,
                       Context context,
                       Monitor monitor,
                       boolean booleanInsteadOfNoSuchElement)

FluentSelect

protected FluentSelect(org.openqa.selenium.WebDriver delegate,
                       org.openqa.selenium.support.ui.Select currentSelect,
                       org.openqa.selenium.WebElement currentElement,
                       Context context,
                       Monitor monitor,
                       boolean booleanInsteadOfNoSuchElement)
Method Detail

ifInvisibleWaitUpTo

public FluentSelect ifInvisibleWaitUpTo(Period period)
Overrides:
ifInvisibleWaitUpTo in class FluentWebElement

isMultiple

public boolean isMultiple()
Returns:
Whether this select element support selecting multiple options at the same time? This is done by checking the value of the "multiple" attribute.

getOptions

public List<org.openqa.selenium.WebElement> getOptions()
Returns:
All options belonging to this select tag

getAllSelectedOptions

public List<org.openqa.selenium.WebElement> getAllSelectedOptions()
Returns:
All selected options belonging to this select tag

getFirstSelectedOption

public org.openqa.selenium.WebElement getFirstSelectedOption()
Returns:
The first selected option in this select tag (or the currently selected option in a normal select)

selectByVisibleText

public FluentSelect selectByVisibleText(String text)
Select all options that display text matching the argument. That is, when given "Bar" this would select an option like:

<option value="foo">Bar</option>

Parameters:
text - The visible text to match against

selectByIndex

public FluentSelect selectByIndex(int index)
Select the option at the given index. This is done by examing the "index" attribute of an element, and not merely by counting.

Parameters:
index - The option at this index will be selected

selectByValue

public FluentSelect selectByValue(String value)
Select all options that have a value matching the argument. That is, when given "foo" this would select an option like:

<option value="foo">Bar</option>

Parameters:
value - The value to match against

deselectAll

public FluentSelect deselectAll()
Clear all selected entries. This is only valid when the SELECT supports multiple selections.

Throws:
UnsupportedOperationException - If the SELECT does not support multiple selections

deselectByValue

public FluentSelect deselectByValue(String value)
Deselect all options that have a value matching the argument. That is, when given "foo" this would deselect an option like:

<option value="foo">Bar</option>

Parameters:
value - The value to match against

deselectByIndex

public FluentSelect deselectByIndex(int index)
Deselect the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting.

Parameters:
index - The option at this index will be deselected

deselectByVisibleText

public FluentSelect deselectByVisibleText(String text)
Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:

<option value="foo">Bar</option>

Parameters:
text - The visible text to match against

getSelect

protected org.openqa.selenium.support.ui.Select getSelect()

within

public FluentSelect within(Period period)
Overrides:
within in class FluentWebElement


Copyright © 2013. All Rights Reserved.