I want to create a Java program that can retrieve data from websites.
I succefully send HTML Forms (like this : )
Code:
public static void submittingForm() throws Exception {
final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_3_6);
webClient.setThrowExceptionOnScriptError(false);
final HtmlPage page1 = webClient
.getPage("http://bokobok.free.fr/index.php?page=post&action=newuser");
final List<HtmlForm> forms = page1.getForms();
HtmlForm form = null;
while (!forms.isEmpty()) {
form = forms.remove(0);
if (form.getId() == "form")
break;
}
if (form != null) {
HtmlButton submitButton = (HtmlButton) page1
.createElement("button");
submitButton.setAttribute("type", "submit");
form.appendChild(submitButton);
final HtmlTextInput lastName = form.getElementById("nom");
final HtmlTextInput firstName = form.getElementById("prenom");
final HtmlTextInput mail = form.getElementById("mail");
final HtmlPasswordInput pass = (HtmlPasswordInput) form
.getElementById("pass");
final HtmlPasswordInput pass2 = (HtmlPasswordInput) form
.getElementById("pass2");
lastName.setValueAttribute("TestLastName");
firstName.setValueAttribute("TesFirstName");
mail.setValueAttribute("mail@mail.com");
pass.setValueAttribute("root");
pass2.setValueAttribute("root");
submitButton.click();
}
webClient.closeAllWindows();
}
What I wanna do now is to log into a website that use virtual keyboard input like this :
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.