From: Albu G. <alb...@gm...> - 2017-07-19 12:50:57
|
DId you try this: HtmlForm form = (HtmlForm) page.getByXPath("/html/body/form").get(0); HtmlTextInput name = form.getInputByName("marca"); Anyway first thing to do is test with devtools int he website if it is correct check javascript error And last but not least your best friend is the Firefox extension: htmlunitscripter Le 19/07/2017 à 13:52, José Román | Idiria S.L. a écrit : > > Hi!, > > I am trying to get an input element from this web: > > https://www.milanuncios.com/textos-del-anuncio/?demandax=n&c=131&idlocalidad=8&p=almeria&x=27&y=0 > > The input itself is: > > |<inputclass="inputs > campoGrande"name="marca"value=""maxlength="120"size="12"id="marca"tabindex="1"type="text">| > > I have tried different approaches but all I always get is a "null" > reference: > > |HtmlInput inputZona = (HtmlInput) currentPage.getElementById("marca"); > HtmlInput inputZona = (HtmlInput) > currentPage.getFirstByXPath("//input[@name='marca']");| > > Also tried JSoup with same results :-( > > Both, HTMLUnit and XPAth fail to get the item. > > What is going on with this? > > Thanks in advance, > > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |