Hey !
I want to create a Java program that can retrieve data from websites.
I succefully send HTML Forms (like this : )
What I wanna do now is to log into a website that use virtual keyboard input 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(); }
https://www.boursorama.com/connexion.phtml?
Enter "00000000" into "Identifiant"
Then click into "Mot de passe"
Now you see this :
http://www.codeguru.com/forum/attach...1&d=1321968164
What can I do to enter the code "123456789" for example ?
Thanks!


Reply With Quote
Bookmarks