public class Element
extends java.lang.Object
Constructor and Description |
---|
Element(java.lang.String id,
MacacaDriver driver) |
Modifier and Type | Method and Description |
---|---|
void |
back() |
void |
clearText() |
void |
click()
click this element
Support: Android iOS Web(WebView)
|
int |
countOfChildElements(GetElementWay using,
java.lang.String value)
Deprecated.
|
JSONArray |
findChildElements(GetElementWay using,
java.lang.String value)
Deprecated.
|
double |
getCenterX()
get CenterX coordinate for this element
|
double |
getCenterY()
get CenterY coordinate for this element
|
java.lang.String |
getComputedCss(java.lang.String propertyName) |
java.lang.String |
getElementId() |
double |
getHeight()
get height for this element
|
double |
getOriginX()
get X coordinate for this element
|
double |
getOriginY()
get Y coordinater for this element
|
java.lang.Object |
getProperty(java.lang.String name)
Get the result of a property of a element.
Support: Android iOS Web(WebView). |
java.lang.Object |
getRect() |
java.lang.String |
getText() |
double |
getWidth()
get width for this element
|
boolean |
hasChildElement(GetElementWay using,
java.lang.String value)
Deprecated.
|
boolean |
isDisplayed()
Deprecated.
|
void |
sendKeys(java.lang.String keys)
Send a sequence of key strokes to the active element.
Support: Android iOS Web(WebView) |
void |
setElementId(java.lang.Object elementId) |
void |
setValue(JSONObject jsonObject) |
void |
touch(java.lang.String action,
JSONObject args) |
public Element(java.lang.String id, MacacaDriver driver)
public void setElementId(java.lang.Object elementId)
public java.lang.String getElementId()
public void sendKeys(java.lang.String keys) throws java.lang.Exception
Send a sequence of key strokes to the active element.
Support: Android iOS Web(WebView)
keys
- The keys sequence to be sent.java.lang.Exception
public void setValue(JSONObject jsonObject) throws java.lang.Exception
jsonObject
- java.lang.Exception
public void click() throws java.lang.Exception
java.lang.Exception
@Deprecated public boolean hasChildElement(GetElementWay using, java.lang.String value) throws java.lang.Exception
using
- way to find target elementvalue
- value to find target element,paired with usingjava.lang.Exception
@Deprecated public JSONArray findChildElements(GetElementWay using, java.lang.String value) throws java.lang.Exception
using
- way to find target elementvalue
- value to find target element,paired with usingjava.lang.Exception
@Deprecated public int countOfChildElements(GetElementWay using, java.lang.String value) throws java.lang.Exception
using
- way to find target elementvalue
- value to find target element,paired with usingjava.lang.Exception
public java.lang.String getText() throws java.lang.Exception
java.lang.Exception
public void clearText() throws java.lang.Exception
java.lang.Exception
public void back() throws java.lang.Exception
java.lang.Exception
public java.lang.Object getProperty(java.lang.String name) throws java.lang.Exception
Get the result of a property of a element.
Support: Android iOS Web(WebView).
iOS: 'isVisible', 'isAccessible', 'isEnabled', 'type', 'label', 'name', 'value',
Android: 'selected', 'description', 'text'
name
- The property name of elementjava.lang.Exception
public java.lang.Object getRect() throws java.lang.Exception
java.lang.Exception
public java.lang.String getComputedCss(java.lang.String propertyName) throws java.lang.Exception
java.lang.Exception
@Deprecated public boolean isDisplayed() throws java.lang.Exception
java.lang.Exception
public void touch(java.lang.String action, JSONObject args) throws java.lang.Exception
java.lang.Exception
public double getOriginX() throws java.lang.Exception
java.lang.Exception
public double getOriginY() throws java.lang.Exception
java.lang.Exception
public double getWidth() throws java.lang.Exception
java.lang.Exception
public double getHeight() throws java.lang.Exception
java.lang.Exception
public double getCenterX() throws java.lang.Exception
java.lang.Exception
public double getCenterY() throws java.lang.Exception
java.lang.Exception