【发布时间】:2019-01-25 23:07:42
【问题描述】:
如何从该网站为Try it 按钮构建xpath:
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_alert
driver.findElement(By.xpath("//div[@id='iframewrapper']/iframe/????")).click();
我也试过这个 xpath //body[@contenteditable='false']/button 我知道不推荐。在 Chrome console 中可以,但在 Selenium 中找不到它,我不知道为什么。
【问题讨论】:
-
你应该为你想要的编程语言添加一个标签。