public class YamlLocation extends AbstractLocation implements ReadElementLimit, AppElementLocation
文件名:YamlLocation.java
用途: 用于读取以yaml文件形式存储的元素定位信息
编码时间:2021年11月24日 上午7:58:43
修改时间:2021年11月24日 上午7:58:43
Modifier and Type | Field and Description |
---|---|
static String |
KEY_BEFORE_TIME_VALUE
指向yaml中的元素前置等待时间key值
|
static String |
KEY_CONTEXT_VALUE
指向yaml中的元素与app相关的上下文key值
|
static String |
KEY_DEFAULT_VALUE
指向yaml中的元素默认值的key值
|
static String |
KEY_ELEMENT
指向yaml中的元素key值
|
static String |
KEY_IFRAME
指向yaml中的元素所在窗体key值
|
static String |
KEY_LOCATION
指向yaml中的元素定位方式key值
|
static String |
KEY_TEMP
指向yaml中的元素定位模板key值
|
static String |
KEY_TEMPLETE
指向yaml中的模板key值
|
static String |
KEY_TYPE
指向yaml中的元素定位类型key值
|
static String |
KEY_VALUE
指向yaml中的元素定位模板key值
|
static String |
KEY_WAIT
指向yaml中的元素等待时间key值
|
END_SIGN, name, placeholder, START_SIGN
Constructor and Description |
---|
YamlLocation(File yamlFile)
通过写在文件中的yaml文本类对象对类进行构造
|
Modifier and Type | Method and Description |
---|---|
protected void |
analysisYaml(Map<String,Object> locationMap)
用于解析读取到的yaml文件中的内容,将其转换为相应的map集合
|
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, toWaitTime
public static final String KEY_TEMPLETE
public static final String KEY_ELEMENT
public static final String KEY_LOCATION
public static final String KEY_TEMP
public static final String KEY_VALUE
public static final String KEY_TYPE
public static final String KEY_WAIT
public static final String KEY_DEFAULT_VALUE
public static final String KEY_IFRAME
public static final String KEY_CONTEXT_VALUE
public static final String KEY_BEFORE_TIME_VALUE
public YamlLocation(File yamlFile)
yamlFile
- 存储yaml的文件类对象public ArrayList<ElementLocationInfo> getElementLocation()
ReadLocation
getElementLocation
in interface ReadLocation
public ElementType getElementType()
ReadLocation
getElementType
in interface ReadLocation
ElementType
枚举)public ArrayList<String> getIframeNameList()
ReadLocation
getIframeNameList
in interface ReadLocation
public long getWaitTime()
ReadLocation
getWaitTime
in interface ReadLocation
public ReadLocation find(String name)
ReadLocation
find
in interface ReadLocation
name
- 元素名称public long getBeforeTime()
ReadLocation
注意:该方法读取到的时间单位为毫秒
getBeforeTime
in interface ReadLocation
public boolean isNative()
AppElementLocation
isNative
in interface AppElementLocation
public String getContext()
AppElementLocation
getContext
in interface AppElementLocation
public String getDefaultValue()
ReadElementLimit
getDefaultValue
in interface ReadElementLimit
Copyright © 2024. All rights reserved.