getRect

abstract fun getRect(scope: CoroutineScope, xpath: String): Deferred<RectF?>

异步获取元素相对于浏览器视口的位置和尺寸。

Return

一个 Deferred<RectF?>,如果元素存在,则解析为元素的矩形区域,否则为 null

Parameters

scope

用于执行此操作的协程作用域。

xpath

目标元素的XPath。