开发者

How get a text element from an xpath expression in Selenium?

When Selenium navigates through web pages I want to save some of the text from tha开发者_JAVA技巧t web pages. I use Selenium with Java. So is there a way to extract from that web pages the text having a specific xpath?


selenium.getText("//div[@id='debugState']");

Visit, http://release.seleniumhq.org/selenium-remote-control/0.9.0/doc/java/com/thoughtworks/selenium/DefaultSelenium.html#getText%28java.lang.String%29

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜