Bonjour,
J'utilise HtmlUnit pour remplir un formulaire dans un site distant. Mon problème est dans ce site le formulaire est défini comme ce ci:
<form id="MiniConnexion" action="" method="post">
c-à-d il n y a pas d'attribut "name", j'ai besoin de cet attribut car la classe "HtmlPage" ne possède que la méthode "getFormByName"
Voici une partie de mon code :
1 2 3 4 5
| final HtmlPage page1 = webClient.getPage("http://url-site-distant");
// 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("MiniConnexion"); |
SVP, aidez moi, je me suis coincé
Merci d'avance.
Partager