take Element Screenshot
abstract fun takeElementScreenshot(scope: CoroutineScope, xpath: String, file: ScriptFile): Deferred<Boolean>
异步截取由XPath指定的单个元素的图像。
Return
一个 Deferred<Boolean>,表示截图是否成功保存。如果元素未找到,则返回false。
Parameters
scope
用于执行此操作的协程作用域。
xpath
目标元素的XPath。
file
用于保存截图的文件对象。