From: <in...@af...> - 2015-10-10 07:33:49
|
Hi Ahmed, Unfortunately the web page i try to get, is not maintained by me. It is an external site and i can't modify its code. Isn't there a way you (..or me) can do something? Roberto. Il 2015-10-09 20:56 Ahmed Ashour ha scritto: > Hi Roberto, > > When throwing JavaScript is enabled, there is an error > "ReferenceError: "setFooter" is not defined" > > Please provide minimal case as hinted in > http://htmlunit.sourceforge.net/submittingJSBugs.html [1] > > Ahmed > > ------------------------- > FROM: Roberto Bottoni - AfterBit <r.b...@af...> > TO: htm...@li... > SENT: Friday, October 9, 2015 6:17 PM > SUBJECT: [Htmlunit-user] HtmlUnit cannot process page > > Hi Ahmed, > > I use HTMLUnit 2.19, Java 1.7 to get a web page : > http://www.oocl.com/eng/Pages/default.aspx [2] > But it seems that the page is not processed > This is my code : > > public class HtmlUnitTest { > > static final WebClient browser; > > static { > > browser = new WebClient(BrowserVersion.FIREFOX_38); > browser.getOptions().setJavaScriptEnabled(true); > browser.setAjaxController(new NicelyResynchronizingAjaxController()); > CookieManager cookieMan = new CookieManager(); > cookieMan = browser.getCookieManager(); > cookieMan.setCookiesEnabled(true); > browser.getOptions().setRedirectEnabled(true); > browser.getOptions().setThrowExceptionOnFailingStatusCode(false); > browser.getOptions().setPrintContentOnFailingStatusCode(true); > browser.getOptions().setThrowExceptionOnScriptError(false); > > } > > public static void main(String[] args) { > try { > HtmlPage page = (HtmlPage) > browser.getPage("http://www.oocl.com/eng/Pages/default.aspx [2]"); > browser.waitForBackgroundJavaScript(10000); > System.out.println("XML Source : \n" + page.asXml() + "\n"); > } catch (Exception e) { > System.out.println("EXCEPTION --------------- " + e.toString()); > } > } > > } > > Maybe a Javascript Engine problem? > Thanks! > Roberto. > > ------------------------------------------------------------------------------ > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user [3] > > > > Links: > ------ > [1] http://htmlunit.sourceforge.net/submittingJSBugs.html > [2] http://www.oocl.com/eng/Pages/default.aspx > [3] https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > ------------------------------------------------------------------------------ > > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |