From: Guillaume L. <gu...@gm...> - 2017-06-26 10:12:15
|
Hello, I also tried this : HtmlAnchor link = mapDigits.get(chiffre); link.click(); webClient.waitForBackgroundJavaScript(2000); webClient.waitForBackgroundJavaScriptStartingBefore(2000); but still the same problem. Note that there is NO ajax call in the script. It does just change the value of 2 hidden field of a form. But after the call, even after waiting, the value has not been changed. Le lun. 26 juin 2017 à 11:16, Rural Hunter <rur...@gm...> a écrit : > Hi Guillaume, > > You'd better wait for some time after the click by WebClient.waitXXXXXX, > especially for those scripts with ajax calls. > > > 在 2017/6/26 16:59, Guillaume Lepinay 写道: > > Hello every body, > > I have a link like this : > > *<a tabindex="2" href="javascript:raf()">* > * 0 * > *</a>* > > I can find it with HtmlUnit and I use the click() method to execute the > javascript (method raf() in this example). > But nothing happens. > > The script doesn't run any ajax request. It only changes the value of > another field. > But after clicking, when I get the value of the input that should have > changed, it is still the same. > > Is there something special to click this kind of link ? > > Thank you for your help. > > i'm using HtmlUnit 2.23. With the 2.27 and 2.28 SNAPSHOT I get an error > due to illegal character inside the javascript pages. > > > ------------------------------------------------------------------------------ > 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 > -- Cordialement, Guillaume Lepinay www.clangen.com 09 52 95 97 99 |