attribute Contains
abstract fun attributeContains(scope: CoroutineScope, xpath: String, attributeName: String, valueToContain: String): Deferred<Boolean>
异步检查由XPath指定的元素的HTML属性值是否包含指定的子字符串。 这对于检查class列表等非常有用。
Return
一个 Deferred<Boolean>。
Parameters
scope
用于执行此操作的协程作用域。
xpath
目标元素的XPath。
attribute Name
属性名称。
value To Contain
期望包含的子字符串。