com.atlassian.jira.webtest.framework.impl.selenium.component.fc
Class AbstractSeleniumFcInput<I extends FcInput<I,F,S>,F extends FrotherControl<F,S,I>,S extends FcSuggestions<F>>

java.lang.Object
  extended by com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
      extended by com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractSeleniumPageObject
          extended by com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractLocatorBasedPageObject
              extended by com.atlassian.jira.webtest.framework.impl.selenium.core.component.AbstractSeleniumComponent<P>
                  extended by com.atlassian.jira.webtest.framework.impl.selenium.component.SeleniumAutoCompleteInput<I,F>
                      extended by com.atlassian.jira.webtest.framework.impl.selenium.component.fc.AbstractSeleniumFcInput<I,F,S>
All Implemented Interfaces:
AutoCompleteInput<F>, FcInput<I,F,S>, FrotherControlComponent<F,S,I>, Component<F>, ValueHolder, Localizable, PageObject

public abstract class AbstractSeleniumFcInput<I extends FcInput<I,F,S>,F extends FrotherControl<F,S,I>,S extends FcSuggestions<F>>
extends SeleniumAutoCompleteInput<I,F>
implements FcInput<I,F,S>, FrotherControlComponent<F,S,I>

Abstract implementation of FcSuggestions

Since:
4.3

Field Summary
 
Fields inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
assertThat, client, context, timeouts
 
Constructor Summary
protected AbstractSeleniumFcInput(String fieldId, F parent, SeleniumContext context)
           
 
Method Summary
 S arrowDown()
          Press arrow down key in this input.
 S clickDropIcon()
          Click the drop-icon of this input.
protected  FcLozenge createLozenge(String label)
          Create lozenge associated with this input for given label.
 AjsDropdown<F> dropDown()
          AJS.DropDown instance associated with this auto-complete input.
 F fc()
          Frother Control in play.
 TimedCondition hasLozenge(String text)
          Check if this input has lozenge with given text.
protected  SeleniumLocator iconLocator()
          Locator of the drop-down icon element.
protected  SeleniumLocator inputLocator()
          Locator of the input text element.
 Locator locator()
          Locator unambiguously locating this page object.
 TimedQuery<FcLozenge> lozenge(String label)
           Retrieves lozenge with given label.
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.component.SeleniumAutoCompleteInput
asTargetType, clear, detector, focusAway, type, value
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.component.AbstractSeleniumComponent
parent
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractLocatorBasedPageObject
isReady
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.AbstractSeleniumPageObject
body, conditions, css, forClass, id, jQuery, locatorFor, name, queries, waitFor, xpath
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.webtest.framework.component.fc.FcInput
clear, suggestions, type
 
Methods inherited from interface com.atlassian.jira.webtest.framework.component.AutoCompleteInput
focusAway
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.component.Component
parent
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.PageObject
context, isReady
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.component.ValueHolder
value
 

Constructor Detail

AbstractSeleniumFcInput

protected AbstractSeleniumFcInput(String fieldId,
                                  F parent,
                                  SeleniumContext context)
Method Detail

createLozenge

protected FcLozenge createLozenge(String label)
Create lozenge associated with this input for given label.

Parameters:
label - label of the lozenge to create
Returns:
new lozenge instance

inputLocator

protected final SeleniumLocator inputLocator()
Description copied from class: SeleniumAutoCompleteInput
Locator of the input text element.

Specified by:
inputLocator in class SeleniumAutoCompleteInput<I extends FcInput<I,F,S>,F extends FrotherControl<F,S,I>>
Returns:
main input locator

locator

public Locator locator()
Description copied from interface: Localizable
Locator unambiguously locating this page object.

Specified by:
locator in interface Localizable
Returns:
locator

iconLocator

protected final SeleniumLocator iconLocator()
Description copied from class: SeleniumAutoCompleteInput
Locator of the drop-down icon element.

Specified by:
iconLocator in class SeleniumAutoCompleteInput<I extends FcInput<I,F,S>,F extends FrotherControl<F,S,I>>
Returns:
icon locator

dropDown

public final AjsDropdown<F> dropDown()
Description copied from interface: AutoCompleteInput
AJS.DropDown instance associated with this auto-complete input.

Specified by:
dropDown in interface AutoCompleteInput<F extends FrotherControl<F,S,I>>
Returns:
drop-down instance associated with this input

lozenge

public TimedQuery<FcLozenge> lozenge(String label)
Description copied from interface: FcInput

Retrieves lozenge with given label.

Specified by:
lozenge in interface FcInput<I extends FcInput<I,F,S>,F extends FrotherControl<F,S,I>,S extends FcSuggestions<F>>
Returns:
lozenge in this Frother Control input with given label, as a timed query waiting for this input to be ready and for the lozenge to be available. The query will return null if those conditions are not met by given timeout
See Also:
FcLozenge

hasLozenge

public TimedCondition hasLozenge(String text)
Description copied from interface: FcInput
Check if this input has lozenge with given text.

Specified by:
hasLozenge in interface FcInput<I extends FcInput<I,F,S>,F extends FrotherControl<F,S,I>,S extends FcSuggestions<F>>
Parameters:
text - text to find
Returns:
timed condition querying whether any loznge of this input matches given text

fc

public final F fc()
Description copied from interface: FrotherControlComponent
Frother Control in play.

Specified by:
fc in interface FrotherControlComponent<F extends FrotherControl<F,S,I>,S extends FcSuggestions<F>,I extends FcInput<I,F,S>>
Returns:
Frother control instance

arrowDown

public final S arrowDown()
Description copied from interface: AutoCompleteInput
Press arrow down key in this input. This should open the associated drop-down, which may be queried by its Openable.isOpen() method.

Specified by:
arrowDown in interface AutoCompleteInput<F extends FrotherControl<F,S,I>>
Specified by:
arrowDown in interface FcInput<I extends FcInput<I,F,S>,F extends FrotherControl<F,S,I>,S extends FcSuggestions<F>>
Overrides:
arrowDown in class SeleniumAutoCompleteInput<I extends FcInput<I,F,S>,F extends FrotherControl<F,S,I>>
Returns:
drop-down instance associated with this input

clickDropIcon

public final S clickDropIcon()
Description copied from interface: AutoCompleteInput
Click the drop-icon of this input. Depending on the current test state, this should either open, or close the associated drop-down, which may be queried by its appropriate methods: Openable.isOpen() and Openable.isClosed().

Specified by:
clickDropIcon in interface AutoCompleteInput<F extends FrotherControl<F,S,I>>
Specified by:
clickDropIcon in interface FcInput<I extends FcInput<I,F,S>,F extends FrotherControl<F,S,I>,S extends FcSuggestions<F>>
Overrides:
clickDropIcon in class SeleniumAutoCompleteInput<I extends FcInput<I,F,S>,F extends FrotherControl<F,S,I>>
Returns:
drop-down instance associated with this input


Copyright © 2002-2012 Atlassian. All Rights Reserved.