io.selendroid.server.model.internal
Class AbstractWebElementContext
java.lang.Object
io.selendroid.server.model.internal.AbstractWebElementContext
- All Implemented Interfaces:
- FindsByClass, FindsById, FindsByName, FindsByPartialText, FindsByTagName, FindsByText, FindsByXPath, SearchContext
- Direct Known Subclasses:
- DefaultSelendroidDriver.WebviewSearchScope
public abstract class AbstractWebElementContext
- extends Object
- implements SearchContext, FindsByTagName, FindsByName, FindsById, FindsByText, FindsByXPath, FindsByPartialText, FindsByClass
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCATOR_ID
protected static final String LOCATOR_ID
- See Also:
- Constant Field Values
LOCATOR_LINK_TEXT
protected static final String LOCATOR_LINK_TEXT
- See Also:
- Constant Field Values
LOCATOR_PARTIAL_LINK_TEXT
protected static final String LOCATOR_PARTIAL_LINK_TEXT
- See Also:
- Constant Field Values
LOCATOR_NAME
protected static final String LOCATOR_NAME
- See Also:
- Constant Field Values
LOCATOR_TAG_NAME
protected static final String LOCATOR_TAG_NAME
- See Also:
- Constant Field Values
LOCATOR_XPATH
protected static final String LOCATOR_XPATH
- See Also:
- Constant Field Values
LOCATOR_CSS_SELECTOR
protected static final String LOCATOR_CSS_SELECTOR
- See Also:
- Constant Field Values
LOCATOR_CLASS_NAME
protected static final String LOCATOR_CLASS_NAME
- See Also:
- Constant Field Values
knownElements
protected KnownElements knownElements
view
protected volatile android.webkit.WebView view
driver
protected SelendroidWebDriver driver
AbstractWebElementContext
public AbstractWebElementContext(KnownElements knownElements,
android.webkit.WebView webview,
SelendroidWebDriver driver)
replyElements
protected List<AndroidElement> replyElements(org.json.JSONArray result)
replyElement
protected AndroidElement replyElement(org.json.JSONObject result)
newAndroidWebElementById
public AndroidWebElement newAndroidWebElementById(String id)
getElementTree
public AndroidWebElement getElementTree()
findElements
public List<AndroidElement> findElements(By by)
- Description copied from interface:
SearchContext
- Find all elements within the current context using the given mechanism.
- Specified by:
findElements in interface SearchContext
- Parameters:
by - The locating mechanism to use
- Returns:
- A list of all
AndroidElements, or an empty list if nothing matches - See Also:
org.openqa.selenium.By
findElement
public AndroidElement findElement(By by)
- Description copied from interface:
SearchContext
- Find the first
AndroidElement using the given method.
- Specified by:
findElement in interface SearchContext
- Parameters:
by - The locating mechanism
- Returns:
- The first matching element on the current context
findElementById
public AndroidElement findElementById(String id)
- Specified by:
findElementById in interface FindsById
findElementsById
public List<AndroidElement> findElementsById(String id)
- Specified by:
findElementsById in interface FindsById
findElementByTagName
public AndroidElement findElementByTagName(String using)
- Specified by:
findElementByTagName in interface FindsByTagName
findElementByPartialText
public AndroidElement findElementByPartialText(String using)
- Specified by:
findElementByPartialText in interface FindsByPartialText
findElementsByPartialText
public List<AndroidElement> findElementsByPartialText(String using)
- Specified by:
findElementsByPartialText in interface FindsByPartialText
findElementsByTagName
public List<AndroidElement> findElementsByTagName(String using)
- Specified by:
findElementsByTagName in interface FindsByTagName
findElementByText
public AndroidElement findElementByText(String using)
- Specified by:
findElementByText in interface FindsByText
findElementsByText
public List<AndroidElement> findElementsByText(String using)
- Specified by:
findElementsByText in interface FindsByText
findElementByXPath
public AndroidElement findElementByXPath(String using)
- Specified by:
findElementByXPath in interface FindsByXPath
findElementsByXPath
public List<AndroidElement> findElementsByXPath(String using)
- Specified by:
findElementsByXPath in interface FindsByXPath
findElementByCssSelector
public AndroidElement findElementByCssSelector(String using)
findElementsByCssSelector
public List<AndroidElement> findElementsByCssSelector(String using)
findElementByName
public AndroidElement findElementByName(String using)
- Specified by:
findElementByName in interface FindsByName
findElementsByName
public List<AndroidElement> findElementsByName(String using)
- Specified by:
findElementsByName in interface FindsByName
findElementByClass
public AndroidElement findElementByClass(String using)
- Specified by:
findElementByClass in interface FindsByClass
findElementsByClass
public List<AndroidElement> findElementsByClass(String using)
- Specified by:
findElementsByClass in interface FindsByClass
lookupElement
protected abstract AndroidElement lookupElement(String strategy,
String locator)
lookupElements
protected abstract List<AndroidElement> lookupElements(String strategy,
String locator)
Copyright © 2014. All rights reserved.