Is there a way to get / save the DOM with Selenium?

What I'm looking for is a method that works like "captureScreenshot (String path)", but instead of generating the image, the DOM is saved as it is currently. Please note that the existing getBodyText () method is not sufficient.

+2
java dom unit-testing selenium


source to share


1 answer


What are you looking for:

getHtmlSource()

      



It will store all content as a string in a variable and then you can parse the dom however you want.

+1


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics