Can I fill out forms, execute events and Javascript functions in Jsoup? If yes how can I? Or should I go for another parser.
Asked
Active
Viewed 2.9k times
20
-
1How did you fix this? could you get what you want – Dec 01 '15 at 20:49
2 Answers
37
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.

dm3
- 2,038
- 2
- 17
- 20
-
OK Ok. I have a problem, I have two dropdowns on HTML page. When one drop down is changed, the options in other dropdown change. I want to change the first dropdown value in Java code, and then get the new values in the second dropdown, how can I do it in HTML unit? – Sep 08 '11 at 07:28
3
Use Selenium - if you use Selenium 2 WebDriver API, the main classes there are WebDriver, FirefoxDriver, and JavascriptExecutor.

Rostislav Matl
- 4,294
- 4
- 29
- 53