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.
Sign up to request clarification or add additional context in comments.
1 Comment
user517491
user517491
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?
3
Use Selenium - if you use Selenium 2 WebDriver API, the main classes there are WebDriver, FirefoxDriver, and JavascriptExecutor.