|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware com.atlassian.jira.webtest.framework.impl.selenium.locator.AbstractSeleniumLocator
public abstract class AbstractSeleniumLocator
Abstract Selenium locator implementation. Implements location functionality by using standard Selenium location syntax. Uses default locator mappings defined in the framework API.
Field Summary | |
---|---|
protected com.atlassian.jira.webtest.framework.impl.selenium.locator.SeleniumElement |
element
|
protected LocatorData |
locatorData
|
Fields inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware |
---|
assertThat, client, context, timeouts |
Constructor Summary | |
---|---|
protected |
AbstractSeleniumLocator(SeleniumContext ctx,
LocatorData locatorData)
|
protected |
AbstractSeleniumLocator(SeleniumContext ctx,
LocatorData locatorData,
Timeouts defTimeout)
|
protected |
AbstractSeleniumLocator(SeleniumContext ctx,
LocatorType locatorType,
String value)
|
protected |
AbstractSeleniumLocator(SeleniumContext ctx,
LocatorType locatorType,
String value,
Timeouts defTimeout)
|
Method Summary | |
---|---|
String |
bareLocator()
Returns Selenium compatible locator, without the prefix (it is NOT always equal to LocatorData.value() . |
SeleniumLocator |
combine(Locator toNest)
Given toNest, return a new locator that represents an element located by toNest and nested within the element represented by this locator. |
Timeouts |
defaultTimeout()
Default timeout for the timed conditions of this locator's element. |
Element |
element()
Retrieve element corresponding to this locator. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
boolean |
supports(Locator other)
Verify if the other locator is supported by this locator. |
String |
toString()
|
LocatorType |
type()
Type of the locator. |
String |
value()
Value of the locator, used to query and manipulate it in the current test context. |
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware |
---|
context |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.webtest.framework.impl.selenium.locator.SeleniumLocator |
---|
fullLocator, withDefaultTimeout |
Field Detail |
---|
protected final LocatorData locatorData
protected final com.atlassian.jira.webtest.framework.impl.selenium.locator.SeleniumElement element
Constructor Detail |
---|
protected AbstractSeleniumLocator(SeleniumContext ctx, LocatorType locatorType, String value)
protected AbstractSeleniumLocator(SeleniumContext ctx, LocatorType locatorType, String value, Timeouts defTimeout)
protected AbstractSeleniumLocator(SeleniumContext ctx, LocatorData locatorData)
protected AbstractSeleniumLocator(SeleniumContext ctx, LocatorData locatorData, Timeouts defTimeout)
Method Detail |
---|
public final LocatorType type()
LocatorData
type
in interface LocatorData
LocatorType
public final String value()
LocatorData
value
in interface LocatorData
public final Element element()
Locator
Retrieve element corresponding to this locator.
In case the locator locates more then one element, implementations are allowed to:
element
in interface Locator
public final boolean supports(Locator other)
Locator
Verify if the other locator is supported by this locator. This means that other may be
used in the Locator.combine(com.atlassian.jira.webtest.framework.core.locator.Locator)
method of this
locator.
This usually involves type compatibility between the locators and optionally compatibility of the particular locator instances in the current test context.
Example: a jQuery locator would possibly return true
for another jQuery locator, as well as an id
and a class locator, but might return false for an xpath locator, unless it is a very sophisticated implementation
capable of translating xpath into jQuery/css.
supports
in interface Locator
other
- the other locator checked for compatibility
true
, if this locator instance is compatible with the other in the current contextpublic final SeleniumLocator combine(Locator toNest)
Locator
Given toNest, return a new locator that represents an element located by toNest and nested within the element represented by this locator.
toNest must be compatible with this locator, which may be examined by means of the
Locator.supports(com.atlassian.jira.webtest.framework.core.locator.Locator)
method.
combine
in interface Locator
combine
in interface SeleniumLocator
toNest
- locator to nest within this locator
Locator.combine(com.atlassian.jira.webtest.framework.core.locator.Locator)
public String bareLocator()
SeleniumLocator
LocatorData.value()
.
bareLocator
in interface SeleniumLocator
public Timeouts defaultTimeout()
SeleniumLocator
defaultTimeout
in interface SeleniumLocator
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |