【发布时间】:2019-06-11 00:43:00
【问题描述】:
我希望能够通过 cluster-id-hash="foobar" 进行搜索和点击,但我也做不到。找不到元素
以下是页面上的一些 css 示例
<div class="ancCol w33 person-panel" _ngcontent-c6="" cluster-id-hash="KYDQEX8il7BIG2"></div>
or
<div class="ancCol w33 person-panel annColRow" _ngcontent-c6="" cluster-id-hash="5gamjajdkjgPcma">
我已经尝试过,其中 clusterIdHash 是我传递的字符串:
driver.findElement(By.cssSelector(".cluster-id-hash='" + clusterIdHash )).click();
【问题讨论】:
标签: java selenium web automation driver