Bonjour,
Je sollicite votre aide : J'ai un code java qui permet de faire appel à une page HTML en utilisant HTMLUnit.Or, lors du debuggage le code s’arrête à la première instruction qui est :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 final WebClient webClient = new WebClient(); // Get the first page final HtmlPage page1 = webClient.getPage("http://google.com"); // Get the form that we are dealing with and within that form, // find the submit button and the field that we want to change. final HtmlForm form = page1.getFormByName(nomdemaform); final HtmlSubmitInput button = form.getInputByName("bSubmit"); final HtmlTextInput textField = (HtmlTextInput) form.getInputByName(nominput).setValueAttribute(unattribut); // Change the value of the text field // Now submit the form by clicking the button and get back the second page. final HtmlPage page2 = button.click(); webClient.closeAllWindows();
Code : Sélectionner tout - Visualiser dans une fenêtre à part WebClient webClient = new WebClient();
Quelqu'un aune solution à ce problème?
Merci beaucoup
Partager