From: Gael H. <gae...@ho...> - 2005-05-11 10:58:23
|
Ok I started to study the source code but I noticed that the html is well parsed when I call WebResponse rep = webClient.getWebConnection().getResponse(new WebRequestSettings(url)); System.out.println(rep.getContentAsString()); but when I want to click on my button the input isn't find and if I want to display a Xml representation of the form with asXml method, the code is incorrect. HtmlForm form = (HtmlForm)pageCourrante.getForms().get(numeroFormulaire); System.out.println( form.asXml() ); HtmlInput bouton = (HtmlInput)form.getInputByValue(texteBouton); pageCourrante = (HtmlPage)((HtmlInput)bouton).click(); what about the getForms method ? Gael >From: Marc Guillemot <mgu...@ya...> >Reply-To: htm...@li... >To: htm...@li... >Subject: Re: [Htmlunit-user] Disable Tidy >Date: Wed, 11 May 2005 10:52:26 +0200 > >HtmlUnit uses NekoHtml to parse the received html in a well formed tree. It >is absolutely not possible to disable it: how could the html be parsed? >If you don't have the possibility to fix your incorrect html, you can >implement your own WebConnection to change the received html code before it >is parsed by htmlunit. > >Marc. > >Gael Harbonnier wrote: >>I believe HtmlUnit uses Tidy for cleaning Html pages, but is it possible >>to disable it ? >>Htmlunit doesn't succeed in finding a submint button because of the >>transformed web page. >>Tidy tranform this : >> >><form> >> <table> >> <table> >> <input ... > >> </table> >><form> >> >> </table> >> >>into this: >> >><form> >> <table> >> </table> >><form> >> >><table> >> <input ... > >> </table> >> >>and so HtmlUnit doesn't find the input in the form. >> >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by Oracle Space Sweepstakes >>Want to be the first software developer in space? >>Enter now for the Oracle Space Sweepstakes! >>http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click >>_______________________________________________ >>Htmlunit-user mailing list >>Htm...@li... >>https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by Oracle Space Sweepstakes >Want to be the first software developer in space? >Enter now for the Oracle Space Sweepstakes! >http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user |