new ElementHandle(frame, selector, baseSelector)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
frame |
Frame | 所属frame实例 |
selector |
string | 选择器 |
baseSelector |
string | 基础选择器,先查找baseSelector,再在baseSelector的基础上查找当前节点 |
Methods
$(selector) → {ElementHandle}
- Source:
基于当前节点,查询新的单个节点, 对应elm.querySelector(selector)
Parameters:
Name | Type | Description |
---|---|---|
selector |
string |
Returns:
- Type
- ElementHandle
$$(selector) → {Promise.<Array.<ElementHandle>>}
- Source:
基于当前节点,查询新的节点集合, 对应elm.querySelectorAll(selector)
Parameters:
Name | Type | Description |
---|---|---|
selector |
string |
Returns:
- Type
- Promise.<Array.<ElementHandle>>
$eval(selector, pageFunction) → {Promise.<*>}
- Source:
查找节点,并将查找的节点作为参数传为pageFunction
Parameters:
Name | Type | Description |
---|---|---|
selector |
string | |
pageFunction |
function |
Returns:
- Type
- Promise.<*>
$$eval(selector, pageFunction) → {Promise.<*>}
- Source:
查找节点集合,并将查找的节点集合作为参数传为pageFunction
Parameters:
Name | Type | Description |
---|---|---|
selector |
string | |
pageFunction |
function |
Returns:
- Type
- Promise.<*>
$x()
- Source:
todo
asElement()
- Source:
todo
getBoundingClientRect() → {Promise.<Object>}
- Source:
getBoundingClientRect
Returns:
- Type
- Promise.<Object>
boxModel()
- Source:
todo
click(options) → {Promise.<undefined>}
- Source:
点击当前节点
Parameters:
Name | Type | Description |
---|---|---|
options |
* | 暂不支持 |
Returns:
- Type
- Promise.<undefined>
contentFrame() → {Frame}
- Source:
当前节点所属frame
Returns:
- Type
- Frame
dispose()
- Source:
todo
executionContext()
- Source:
todo
check() → {Promise.<undefined>}
- Source:
设置checked属性为true,并触发change事件
Returns:
- Type
- Promise.<undefined>
uncheck() → {Promise.<undefined>}
- Source:
设置checked属性为false,并触发change事件
Returns:
- Type
- Promise.<undefined>
getProperties()
- Source:
todo
getProperty()
- Source:
todo
focus() → {Promise.<undefined>}
- Source:
focus当前节点
Returns:
- Type
- Promise.<undefined>
blur() → {Promise.<undefined>}
- Source:
取消聚焦当前节点
Returns:
- Type
- Promise.<undefined>
getAttributes() → {Promise.<Map.<string, Object>>}
- Source:
获取节点的属性集合
Returns:
- Type
- Promise.<Map.<string, Object>>
getAttribute() → {Promise.<Object>}
- Source:
获取节点的指定属性值
Returns:
通过jsonValue()获取属性值
- Type
- Promise.<Object>
hover() → {Promise.<undefined>}
- Source:
hover当前节点
Returns:
- Type
- Promise.<undefined>
isIntersectingViewport()
- Source:
todo
jsonValue()
- Source:
todo
press(text, options)
- Source:
键入文本
Parameters:
Name | Type | Description |
---|---|---|
text |
string | 输入的文本内容, 暂时只支持单字符输入,即英文字母等 |
options |
* | 暂不支持 |
screenshot()
- Source:
todo
tap()
- Source:
todo
toString()
- Source:
todo
type()
- Source:
todo
uploadFile()
- Source:
todo