io.selendroid.server.model.internal
Class AbstractNativeElementContext

java.lang.Object
  extended by io.selendroid.server.model.internal.AbstractNativeElementContext
All Implemented Interfaces:
FindsByClass, FindsById, FindsByName, FindsByPartialText, FindsByTagName, FindsByText, FindsByXPath, SearchContext
Direct Known Subclasses:
DefaultSelendroidDriver.NativeSearchScope

public abstract class AbstractNativeElementContext
extends Object
implements SearchContext, FindsByTagName, FindsByName, FindsById, FindsByText, FindsByXPath, FindsByPartialText, FindsByClass


Field Summary
protected  ServerInstrumentation instrumentation
           
protected  KeySender keys
           
protected  KnownElements knownElements
           
protected  ViewHierarchyAnalyzer viewAnalyzer
           
 
Constructor Summary
AbstractNativeElementContext(ServerInstrumentation instrumentation, KeySender keys, KnownElements knownElements)
           
 
Method Summary
 AndroidElement findElement(By by)
          Find the first AndroidElement using the given method.
 AndroidElement findElementByClass(String using)
           
 AndroidElement findElementById(String using)
           
 AndroidElement findElementByName(String using)
           
 AndroidElement findElementByPartialText(String using)
           
 AndroidElement findElementByTagName(String using)
           
 AndroidElement findElementByText(String using)
           
 AndroidElement findElementByXPath(String using)
           
 List<AndroidElement> findElements(By by)
          Find all elements within the current context using the given mechanism.
 List<AndroidElement> findElementsByClass(String using)
           
 List<AndroidElement> findElementsById(String using)
           
 List<AndroidElement> findElementsByName(String using)
           
 List<AndroidElement> findElementsByPartialText(String using)
           
 List<AndroidElement> findElementsByTagName(String using)
           
 List<AndroidElement> findElementsByText(String using)
           
 List<AndroidElement> findElementsByXPath(String expression)
           
 org.json.JSONObject getElementTree()
           
protected abstract  android.view.View getRootView()
           
protected abstract  List<android.view.View> getTopLevelViews()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instrumentation

protected ServerInstrumentation instrumentation

keys

protected KeySender keys

knownElements

protected KnownElements knownElements

viewAnalyzer

protected ViewHierarchyAnalyzer viewAnalyzer
Constructor Detail

AbstractNativeElementContext

public AbstractNativeElementContext(ServerInstrumentation instrumentation,
                                    KeySender keys,
                                    KnownElements knownElements)
Method Detail

getElementTree

public org.json.JSONObject getElementTree()
                                   throws org.json.JSONException
Throws:
org.json.JSONException

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

findElementByXPath

public AndroidElement findElementByXPath(String using)
Specified by:
findElementByXPath in interface FindsByXPath

findElementsByXPath

public List<AndroidElement> findElementsByXPath(String expression)
Specified by:
findElementsByXPath in interface FindsByXPath

findElementById

public AndroidElement findElementById(String using)
Specified by:
findElementById in interface FindsById

findElementsById

public List<AndroidElement> findElementsById(String using)
Specified by:
findElementsById in interface FindsById

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

findElementByTagName

public AndroidElement findElementByTagName(String using)
Specified by:
findElementByTagName in interface FindsByTagName

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

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

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

getRootView

protected abstract android.view.View getRootView()

getTopLevelViews

protected abstract List<android.view.View> getTopLevelViews()


Copyright © 2014. All rights reserved.