public class XmlLocation extends AbstractLocation implements ReadElementLimit, AppElementLocation
文件名:XmlLocation.java
用途:该类用于从指定格式的xml中读取元素信息
注意:
编码时间:2017年9月25日下午4:23:40
修改时间:2021年4月17日 上午11:21:25
| Modifier and Type | Field and Description |
|---|---|
protected org.dom4j.Element |
element
缓存元素信息
|
END_SIGN, name, placeholder, START_SIGN| Constructor and Description |
|---|
XmlLocation(org.dom4j.Document dom)
根据xml文件的
Document对象进行构造 |
XmlLocation(File xmlFile)
根据xml文件对象进行构造
|
| Modifier and Type | Method and Description |
|---|---|
ReadLocation |
find(String name)
用于预读元素信息,并将元素信息进行缓存,以便于快速查找元素信息
|
long |
getBeforeTime()
用于返回元素的前置等待时间
|
String |
getContext()
用于返回当前元素的所在的上下文内容
|
String |
getDefaultValue()
用于读取元素的默认值
|
ArrayList<ElementLocationInfo> |
getElementLocation()
用于返回元素的定位信息
|
ElementType |
getElementType()
用于返回元素的类型
|
ArrayList<String> |
getIframeNameList()
用于返回元素的所有父窗体名称集合
|
long |
getWaitTime()
用于返回元素的等待时间
|
boolean |
isNative()
用于返回当前元素是否为app原生元素
|
addReplaceFunction, addReplaceWord, getEndElementPlaceholder, getPlaceholder, getStartElementPlaceholder, setElementPlaceholder, toElementType, toWaitTimepublic XmlLocation(File xmlFile)
xmlFile - xml文件对象IncorrectFileException - xml文件有误时抛出的异常public XmlLocation(org.dom4j.Document dom)
Document对象进行构造dom - Document对象public ArrayList<ElementLocationInfo> getElementLocation()
ReadLocationgetElementLocation in interface ReadLocationpublic ElementType getElementType()
ReadLocationgetElementType in interface ReadLocationElementType枚举)public ArrayList<String> getIframeNameList()
ReadLocationgetIframeNameList in interface ReadLocationpublic long getWaitTime()
ReadLocationgetWaitTime in interface ReadLocationpublic String getDefaultValue()
ReadElementLimitgetDefaultValue in interface ReadElementLimitpublic ReadLocation find(String name)
ReadLocationfind in interface ReadLocationname - 元素名称public boolean isNative()
AppElementLocationisNative in interface AppElementLocationpublic String getContext()
AppElementLocationgetContext in interface AppElementLocationpublic long getBeforeTime()
ReadLocation注意:该方法读取到的时间单位为毫秒
getBeforeTime in interface ReadLocationCopyright © 2024. All rights reserved.