Render JavaScript and HTML in (any) Java Program (Access rendered DOM Tree)?

后端 未结 7 1461
既然无缘
既然无缘 2020-12-28 18:23

What are the best Java libraries to \"fully download any webpage and render the built-in JavaScript(s) and then access the rendered webpage (that is the DOM-Tree !) programm

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-28 19:29

    You can use Java, Groovy with or without Grails. Then use Webdriver, Selenium, Spock and Geb these are for testing purposes, but the libraries are useful for your case. You can implement a Crawler that won't open a new window but just a runtime of these either browser.

    • Selenium : http://code.google.com/p/selenium/
    • Webdriver : http://seleniumhq.org/projects/webdriver/
    • Spock : http://code.google.com/p/spock/
    • Geb : http://www.gebish.org/manual/current/testing.html

提交回复
热议问题