有人可以帮助了解通过 Selenide 进行元素搜索有什么问题。
我有这样的 HTML 代码:
<div>
Current method:
<strong>
SMS
</strong>
</div>
Selenium 发现元素抛出这个 xpath
findElement(By.xpath("//div[contains(. , \"Current method\")]/strong"))
但是 Selenide 使用相同的定位器返回 ElementNotFound 异常
$(By.xpath("//div[contains(. , \"Current method\")]/strong"))