开发者

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

开发者 https://www.devze.com 2023-03-31 15:11 出处:网络
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

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

精彩评论

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