From: Roberto B. - A. <r.b...@af...> - 2014-08-28 14:39:40
|
Yes it works! Thanks!!! ----- Original Message ----- From: Ahmed Ashour To: htm...@li... Sent: Thursday, August 28, 2014 3:55 PM Subject: Re: [Htmlunit-user] Site table not loaded. Hi, Would you use 2.15, or even better the latest snapshot in http://build.canoo.com/htmlunit/ ? I get the container detailed data. Ahmed ------------------------------------------------------------------------------ From: Roberto Bottoni - AfterBit <r.b...@af...> To: htm...@li... Sent: Thursday, August 28, 2014 3:38 PM Subject: [Htmlunit-user] Site table not loaded. HtmlUnit version 2.14 I'm trying to grab this page : http://m.hanjin.com/mhanjin/CUP_MOB_0802.do?menuFlag=C&searchType=C&blCntrNo=CAXU3336862 This is my code : public class Main { static final WebClient browser; static { browser = new WebClient(BrowserVersion.FIREFOX_24); browser.getOptions().setJavaScriptEnabled(true); 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[] arguments) { doTestHANJINMobile(); } private static void doTestHANJINMobile() { try { HtmlPage page = (HtmlPage) browser.getPage("http://m.hanjin.com/mhanjin/CUP_MOB_0802.do?menuFlag=C&searchType=C&blCntrNo=CAXU3336862"); System.out.println("waitForBackgroundJavaScript..."); browser.waitForBackgroundJavaScriptStartingBefore(5000); browser.waitForBackgroundJavaScript(5000); System.out.println("XML Source : \n" + page.asXml() + "\n"); } catch (Exception e) { System.out.println("EXCEPTION --------------- " + e.toString()); } } } But i get just the "Sailing Information" table and not the "Container Detail" table. I tried with other browser version ( IE, Chrome..) but nothing happens... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ------------------------------------------------------------------------------ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |