I am writing a program to check web pages on a remote server. It uses selenium RC to run Firefox with a battery of tests, so I can call arbitrary javascript. When there is a failure, I would like to register the HTML code generated by the page. Now accessing the HTML DOM is easy, but I am having real problems finding the source path. Thanks.
I must repeat that I am not looking for a DOM, but the source is unmodified source code. As can be seen from the image of the right mouse button → view. In particular, if <Html> <body> <table> <tr> <td> fear the table data </td> </table>
is real HTML. Calls document.documentElement.outerHTML || document.documentElement.innerHTML document.documentElement.outerHTML || document.documentElement.innerHTML and selenium.getHTMLSource() will result in <head> </head><body> <table> <tbody><tr> <td> fear the table data </td> </tr></tbody></table> </body>
Mark source share