io.selendroid.server.model
Class AndroidNativeElement

java.lang.Object
  extended by io.selendroid.server.model.AndroidNativeElement
All Implemented Interfaces:
AndroidElement

public class AndroidNativeElement
extends Object
implements AndroidElement


Nested Class Summary
 class AndroidNativeElement.WebViewSourceClient
           
 
Field Summary
protected static long DURATION_OF_LONG_PRESS
           
 
Constructor Summary
AndroidNativeElement(android.view.View view, ServerInstrumentation instrumentation, KeySender keys, KnownElements ke)
           
 
Method Summary
 void addChild(AndroidElement child)
           
 void clear()
           
 void click()
           
 void enterText(CharSequence... keysToSend)
           
 boolean equals(Object obj)
           
 AndroidElement findElement(By by)
           
 List<AndroidElement> findElements(By by)
           
 Integer getAndroidId()
           
 String getAttribute(String attribute)
           
 Collection<AndroidElement> getChildren()
           
 Coordinates getCoordinates()
           
 Point getLocation()
           
 AndroidElement getParent()
           
 Dimension getSize()
           
 String getTagName()
           
 String getText()
           
 android.view.View getView()
           
 int hashCode()
           
 String id()
           
 boolean isDisplayed()
           
 boolean isEnabled()
           
 boolean isSelected()
           
protected  void scrollIntoScreenIfNeeded()
           
protected  void send(CharSequence string)
           
 void setParent(AndroidElement parent)
           
 void setText(CharSequence... keysToSend)
           
 void submit()
           
 org.json.JSONObject toJson()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DURATION_OF_LONG_PRESS

protected static final long DURATION_OF_LONG_PRESS
See Also:
Constant Field Values
Constructor Detail

AndroidNativeElement

public AndroidNativeElement(android.view.View view,
                            ServerInstrumentation instrumentation,
                            KeySender keys,
                            KnownElements ke)
Method Detail

getParent

public AndroidElement getParent()
Specified by:
getParent in interface AndroidElement

isDisplayed

public boolean isDisplayed()
Specified by:
isDisplayed in interface AndroidElement

scrollIntoScreenIfNeeded

protected void scrollIntoScreenIfNeeded()

enterText

public void enterText(CharSequence... keysToSend)
Specified by:
enterText in interface AndroidElement

getText

public String getText()
Specified by:
getText in interface AndroidElement

click

public void click()
Specified by:
click in interface AndroidElement

getAndroidId

public Integer getAndroidId()

findElement

public AndroidElement findElement(By by)
                           throws NoSuchElementException
Specified by:
findElement in interface AndroidElement
Throws:
NoSuchElementException

findElements

public List<AndroidElement> findElements(By by)
                                  throws NoSuchElementException
Specified by:
findElements in interface AndroidElement
Throws:
NoSuchElementException

getChildren

public Collection<AndroidElement> getChildren()
Specified by:
getChildren in interface AndroidElement

setParent

public void setParent(AndroidElement parent)

addChild

public void addChild(AndroidElement child)

toString

public String toString()
Specified by:
toString in interface AndroidElement
Overrides:
toString in class Object

send

protected void send(CharSequence string)

toJson

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

getView

public android.view.View getView()

clear

public void clear()
Specified by:
clear in interface AndroidElement

submit

public void submit()
Specified by:
submit in interface AndroidElement

isSelected

public boolean isSelected()
Specified by:
isSelected in interface AndroidElement

getLocation

public Point getLocation()
Specified by:
getLocation in interface AndroidElement

getCoordinates

public Coordinates getCoordinates()
Specified by:
getCoordinates in interface AndroidElement

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getSize

public Dimension getSize()
Specified by:
getSize in interface AndroidElement

getAttribute

public String getAttribute(String attribute)
Specified by:
getAttribute in interface AndroidElement

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface AndroidElement

getTagName

public String getTagName()
Specified by:
getTagName in interface AndroidElement

setText

public void setText(CharSequence... keysToSend)
Specified by:
setText in interface AndroidElement

id

public String id()
Specified by:
id in interface AndroidElement


Copyright © 2014. All rights reserved.