[英]How can I find all of the descendants with a specific attribute of an web element using ChromeDriver
要查找具有包含“attributeValue”的属性的元素:
List<WebElement> childs = rootWebElement.findElements(By.xpath(".//*[contains(@attributeName,'attributeValue')]"));
要查找具有完全匹配“attributeValue”的属性的元素:
List<WebElement> childs = rootWebElement.findElements(By.xpath(".//*[@attributeName='attributeValue']"));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.