简体   繁体   中英

Jsoup Java HTML parser : Executing Javascript events

Can I fill out forms, execute events and Javascript functions in Jsoup? If yes how can I? Or should I go for another parser.

JSoup is just an HTML parser/"tidyfier" - not a browser emulator. To interact with HTML pages (execute javascript, fill out forms, etc.) you should use a tool like HtmlUnit or Selenium .

Use Selenium - if you use Selenium 2 WebDriver API, the main classes there are WebDriver , FirefoxDriver, and JavascriptExecutor.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM