How to save complete web page

后端 未结 2 1863
太阳男子
太阳男子 2021-01-19 06:34

Is there any way to save complete web-page using WebDriver?

Currently I do getPageSource() and then put everything into html local file, but saved page is in not goo

相关标签:
2条回答
  • 2021-01-19 07:07

    Strange characters might have something to do with the encoding of the written file.

    The other problems will probably have to do with the fact that you are loading a static html file for which the relative url's no longer point to anything. Any javascript, css and image files will be missing.

    0 讨论(0)
  • 2021-01-19 07:17

    Savw webPage to a file Try it. but i didn't checked this

    0 讨论(0)
提交回复
热议问题