From: José R. | I. S.L. <jr...@id...> - 2017-07-19 12:54:09
|
Hi, Thanks a lot for your response!. Just a couple of seconds before your mail I managed to do it by using XPath absolute navigation path... (/html/body/div/...). Thanks again El 19 jul. 2017 2:51 p. m., "Albu Gmail" <alb...@gm...> escribió: > 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: > > <input class="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 lis...@li...https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > ------------------------------------------------------------ > ------------------ > 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 > > |