From: Ahmed A. <asa...@ya...> - 2015-09-26 07:06:09
|
Hi, - Please subscribe to the list before posting. The website has a CSS with URL //:, which wasn't correctly handled by HtmlUnit, and it now fixed in SVN.Please get the latest build, with which the far below code works.P.S. next time, you don't need to cross post :)Thanks,Ahmed try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/DetailQuote.aspx?&symbol1"); HtmlInput input = page.getHtmlElementById("PY_txt"); input.type("328"); final HtmlPage page2 = page.getHtmlElementById("imgHKStockSubmit").click(); System.out.println(page2.getUrl()); System.out.println(page2.asText()); } From: "htm...@li..." <htm...@li...> Sent: Saturday, September 26, 2015 8:41 AM ----- Forwarded Message ----- The attached message has been automatically discarded. am completely new to HtmlUnit and I do not really know how to read and understand the page source of a website. Nonetheless,I have written code (learned from this tutorial)to try and access the following websiteThen I am stuck, as I am not familiar with javascript. This is what I want to achieve: - I would like to type into 328 to the textfield on the left menu on that website - and click submit button So that I can be brought to the next page.However, with the code that I have written so far. I am NOT able to locate the input text field on the left menu of the website and click the submit button. Can someone show me how this can be done please? Thankspublic void testing() throws Exception { /* turn off annoying htmlunit warnings */ java.util.logging.Logger.getLogger("com.gargoylesoftware").setLevel(java.util.logging.Level.OFF); try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/DetailQuote.aspx?&symbol=1"); final HtmlDivision div = page.getHtmlElementById("LeftMenu_Button"); } } |
From: Ahmed A. <asa...@ya...> - 2015-09-26 20:04:46
|
Hi Desean, - You are still not subscribed to the user-list.- Please provide the details, what errors you get, and what is your code. Ahmed From: Tom(Desean) Ng <tho...@go...> To: Ahmed Ashour <asa...@ya...> Cc: "htm...@li..." <htm...@li...>; "tho...@go..." <tho...@go...> Sent: Saturday, September 26, 2015 7:41 PM Subject: Re: Fail to locate the input text field on left menu as well Hi, Thanks Ahmed. The solution worked. Then several hours later, I got home and I tried to re-run the code again and I got errors again. This time I was not able to get access to the website. - What may the cause be ? - How can I overcome this? Thanks. Desean. On Sep 26, 2015, at 3:06 PM, Ahmed Ashour <asa...@ya...> wrote: Hi, - Please subscribe to the list before posting. The website has a CSS with URL //:, which wasn't correctly handled by HtmlUnit, and it now fixed in SVN.Please get the latest build, with which the far below code works.P.S. next time, you don't need to cross post :)Thanks,Ahmed try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/DetailQuote.aspx?&symbol1"); HtmlInput input = page.getHtmlElementById("PY_txt"); input.type("328"); final HtmlPage page2 = page.getHtmlElementById("imgHKStockSubmit").click(); System.out.println(page2.getUrl()); System.out.println(page2.asText()); } From: "htm...@li..." <htm...@li...> Sent: Saturday, September 26, 2015 8:41 AM ----- Forwarded Message ----- The attached message has been automatically discarded. am completely new to HtmlUnit and I do not really know how to read and understand the page source of a website. Nonetheless,I have written code (learned from this tutorial)to try and access the following websiteThen I am stuck, as I am not familiar with javascript. This is what I want to achieve: - I would like to type into 328 to the textfield on the left menu on that website - and click submit button So that I can be brought to the next page.However, with the code that I have written so far. I am NOT able to locate the input text field on the left menu of the website and click the submit button. Can someone show me how this can be done please? Thankspublic void testing() throws Exception { /* turn off annoying htmlunit warnings */ java.util.logging.Logger.getLogger("com.gargoylesoftware").setLevel(java.util.logging.Level.OFF); try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/DetailQuote.aspx?&symbol=1"); final HtmlDivision div = page.getHtmlElementById("LeftMenu_Button"); } } <Mail Attachment.eml> |
From: Ahmed A. <asa...@ya...> - 2015-09-27 05:43:23
Attachments:
Screen Shot 2015-09-27 at 1.29.50 PM.png
|
Hi, tho...@gm... is subscribed, but not @googlemail.com Ahmed From: Tom(Desean) Ng <tho...@go...> To: Ahmed Ashour <asa...@ya...>; "htm...@li..." <htm...@li...> Cc: Tom(Desean) Ng <tho...@go...> Sent: Sunday, September 27, 2015 7:38 AM Subject: Re: Fail to locate the input text field on left menu as well I subscribed to the mailing list yesterday via http://htmlunit.sourceforge.net/mail-lists.html. I am not sure if I have submitted to the wrong thing though. (Please see the attached image). Please correct me if I did. I was basically using the code you provided. try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/detailquote.aspx?&symbol=1"); HtmlInput input = page.getHtmlElementById("PY_txt"); input.type("1"); final HtmlPage page2 = page.getHtmlElementById("imgHKStockSubmit").click(); System.out.println(page2.getUrl()); System.out.println(page2.asText()); System.out.println("***************************** Cookies:"); System.out.println(webClient.getCookieManager().getCookies()); The error message is listed below:Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:34 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:34 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, <COMMA>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warningWARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' [2:1] Ignoring the following declarations in this rule.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, <COMMA>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warningWARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' [2:1] Ignoring the following declarations in this rule.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, <COMMA>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warningWARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' [2:1] Ignoring the following declarations in this rule.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' [202:19] Error in expression; ':' found after identifier "progid".Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' [202:19] Error in expression; ':' found after identifier "progid".Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' [202:19] Error in expression; ':' found after identifier "progid".Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' [104:392] Error in expression; ':' found after identifier "progid".Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' [106:110] Error in expression; ':' found after identifier "progid".Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' [104:392] Error in expression; ':' found after identifier "progid".Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' [106:110] Error in expression; ':' found after identifier "progid".Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' [104:392] Error in expression; ':' found after identifier "progid".Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' [106:110] Error in expression; ':' found after identifier "progid".Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warningWARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' [1:2] Ignoring the following declarations in this rule.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warningWARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' [1:2] Ignoring the following declarations in this rule.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", ".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warningWARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' [1:2] Ignoring the following declarations in this rule.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", ".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warningWARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' [1:2] Ignoring the following declarations in this rule.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", ".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warningWARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' [1:2] Ignoring the following declarations in this rule.Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler errorWARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.)Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warningWARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' [1:2] Ignoring the following declarations in this rule.Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'application/x-javascript'.Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:41 PM org.apache.http.client.protocol.ResponseProcessCookies processCookiesWARNING: Cookie rejected [test_cookie="CheckForPermission", version:0, domain:doubleclick.net, path:/, expiry:Sun Sep 27 13:49:40 HKT 2015] Illegal 'domain' attribute "doubleclick.net". Domain of origin: "pagead2.googlesyndication.com"Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument closeWARNING: close() called when document is not open.Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument closeWARNING: close() called when document is not open.Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument closeWARNING: close() called when document is not open.Sep 27, 2015 1:34:43 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'.Sep 27, 2015 1:34:44 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notifyWARNING: Obsolete content type encountered: 'text/javascript'. On Sep 27, 2015, at 4:04 AM, Ahmed Ashour <asa...@ya...> wrote: Hi Desean, - You are still not subscribed to the user-list.- Please provide the details, what errors you get, and what is your code. Ahmed From: Tom(Desean) Ng <tho...@go...> To: Ahmed Ashour <asa...@ya...> Cc: "htm...@li..." <htm...@li...>; "tho...@go..." <tho...@go...> Sent: Saturday, September 26, 2015 7:41 PM Subject: Re: Fail to locate the input text field on left menu as well Hi, Thanks Ahmed. The solution worked. Then several hours later, I got home and I tried to re-run the code again and I got errors again. This time I was not able to get access to the website. - What may the cause be ? - How can I overcome this? Thanks. Desean. On Sep 26, 2015, at 3:06 PM, Ahmed Ashour <asa...@ya...> wrote: Hi, - Please subscribe to the list before posting. The website has a CSS with URL //:, which wasn't correctly handled by HtmlUnit, and it now fixed in SVN.Please get the latest build, with which the far below code works.P.S. next time, you don't need to cross post :)Thanks,Ahmed try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/DetailQuote.aspx?&symbol1"); HtmlInput input = page.getHtmlElementById("PY_txt"); input.type("328"); final HtmlPage page2 = page.getHtmlElementById("imgHKStockSubmit").click(); System.out.println(page2.getUrl()); System.out.println(page2.asText()); } From: "htm...@li..." <htm...@li...> Sent: Saturday, September 26, 2015 8:41 AM ----- Forwarded Message ----- The attached message has been automatically discarded. am completely new to HtmlUnit and I do not really know how to read and understand the page source of a website. Nonetheless,I have written code (learned from this tutorial)to try and access the following websiteThen I am stuck, as I am not familiar with javascript. This is what I want to achieve: - I would like to type into 328 to the textfield on the left menu on that website - and click submit button So that I can be brought to the next page.However, with the code that I have written so far. I am NOT able to locate the input text field on the left menu of the website and click the submit button. Can someone show me how this can be done please? Thankspublic void testing() throws Exception { /* turn off annoying htmlunit warnings */ java.util.logging.Logger.getLogger("com.gargoylesoftware").setLevel(java.util.logging.Level.OFF); try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/DetailQuote.aspx?&symbol=1"); final HtmlDivision div = page.getHtmlElementById("LeftMenu_Button"); } } <Mail Attachment.eml> |
From: Tom(Desean) N. <tho...@go...> - 2015-09-27 06:07:27
|
Hi, I believe I have finally subscribed with the right email address here. I was using the code to 1) get access to the website, 2) type some input in the left menu and then 3) click submit , in order to land on the second page and download that page’s cookies. Below is the code that I used. But I got a list of errors. What is the cause ? How can i overcome this? Thanks DeSean > > > try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { > > final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/detailquote.aspx?&symbol=1 <http://www.aastocks.com/en/stock/detailquote.aspx?&symbol=1> > "); > > HtmlInput input = page.getHtmlElementById("PY_txt"); > input.type("1"); > final HtmlPage page2 = page.getHtmlElementById("imgHKStockSubmit").click(); > System.out.println(page2.getUrl()); > System.out.println(page2.asText()); > System.out.println("***************************** Cookies:"); > System.out.println(webClient.getCookieManager().getCookies()); > > > The error message is listed below: > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:34 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:34 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, <COMMA>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, <COMMA>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, <COMMA>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", ".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", ".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", ".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:41 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies > WARNING: Cookie rejected [test_cookie="CheckForPermission", version:0, domain:doubleclick.net, path:/, expiry:Sun Sep 27 13:49:40 HKT 2015] Illegal 'domain' attribute "doubleclick.net <http://doubleclick.net/>". Domain of origin: "pagead2.googlesyndication.com <http://pagead2.googlesyndication.com/>" > Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument close > WARNING: close() called when document is not open. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument close > WARNING: close() called when document is not open. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument close > WARNING: close() called when document is not open. > Sep 27, 2015 1:34:43 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:44 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > On Sep 27, 2015, at 1:43 PM, Ahmed Ashour <asa...@ya...> wrote: > > Hi, > > tho...@gm... <https://lists.sourceforge.net/lists/options/htmlunit-user/thomastskng--at--gmail.com> is subscribed, but not @googlemail.com > > Ahmed > > From: Tom(Desean) Ng <tho...@go...> > To: Ahmed Ashour <asa...@ya...>; "htm...@li..." <htm...@li...> > Cc: Tom(Desean) Ng <tho...@go...> > Sent: Sunday, September 27, 2015 7:38 AM > Subject: Re: Fail to locate the input text field on left menu as well > > I subscribed to the mailing list yesterday via http://htmlunit.sourceforge.net/mail-lists.html <http://htmlunit.sourceforge.net/mail-lists.html>. I am not sure if I have submitted to the wrong thing though. (Please see the attached image). Please correct me if I did. > > I was basically using the code you provided. > > try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { > > final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/detailquote.aspx?&symbol=1 <http://www.aastocks.com/en/stock/detailquote.aspx?&symbol=1> > "); > > HtmlInput input = page.getHtmlElementById("PY_txt"); > input.type("1"); > final HtmlPage page2 = page.getHtmlElementById("imgHKStockSubmit").click(); > System.out.println(page2.getUrl()); > System.out.println(page2.asText()); > System.out.println("***************************** Cookies:"); > System.out.println(webClient.getCookieManager().getCookies()); > > > The error message is listed below: > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:34 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:34 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, <COMMA>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, <COMMA>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, <COMMA>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", ".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", ".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", ".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error > WARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", <COMMA>, <HASH>, <S>.) > Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning > WARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Ignoring the following declarations in this rule. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'application/x-javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:41 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies > WARNING: Cookie rejected [test_cookie="CheckForPermission", version:0, domain:doubleclick.net, path:/, expiry:Sun Sep 27 13:49:40 HKT 2015] Illegal 'domain' attribute "doubleclick.net <http://doubleclick.net/>". Domain of origin: "pagead2.googlesyndication.com <http://pagead2.googlesyndication.com/>" > Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument close > WARNING: close() called when document is not open. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument close > WARNING: close() called when document is not open. > Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument close > WARNING: close() called when document is not open. > Sep 27, 2015 1:34:43 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > Sep 27, 2015 1:34:44 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify > WARNING: Obsolete content type encountered: 'text/javascript'. > > <Screen Shot 2015-09-27 at 1.29.50 PM.png> > > >> On Sep 27, 2015, at 4:04 AM, Ahmed Ashour <asa...@ya... <mailto:asa...@ya...>> wrote: >> >> Hi Desean, >> >> - You are still not subscribed to the user-list. >> - Please provide the details, what errors you get, and what is your code. >> >> Ahmed >> >> From: Tom(Desean) Ng <tho...@go... <mailto:tho...@go...>> >> To: Ahmed Ashour <asa...@ya... <mailto:asa...@ya...>> >> Cc: "htm...@li... <mailto:htm...@li...>" <htm...@li... <mailto:htm...@li...>>; "tho...@go... <mailto:tho...@go...>" <tho...@go... <mailto:tho...@go...>> >> Sent: Saturday, September 26, 2015 7:41 PM >> Subject: Re: Fail to locate the input text field on left menu as well >> >> Hi, >> >> Thanks Ahmed. The solution worked. Then several hours later, I got home and I tried to re-run the code again and I got errors again. This time I was not able to get access to the website. >> - What may the cause be ? >> - How can I overcome this? >> >> Thanks. >> >> Desean. >> >> >>> >>> >>> On Sep 26, 2015, at 3:06 PM, Ahmed Ashour <asa...@ya... <mailto:asa...@ya...>> wrote: >>> >>> Hi, >>> >>> - Please subscribe to the list before posting. >>> >>> >>> The website has a CSS with URL //:, which wasn't correctly handled by HtmlUnit, and it now fixed in SVN. >>> Please get the latest build <https://ci.canoo.com/teamcity/viewLog.html?buildTypeId=HtmlUnit_FastBuild&buildId=lastSuccessful&tab=artifacts>, with which the far below code works. >>> P.S. next time, you don't need to cross post :) >>> Thanks, >>> Ahmed >>> try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { >>> >>> final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/DetailQuote.aspx?&symbol1 <http://www.aastocks.com/en/stock/DetailQuote.aspx?&symbol1>"); >>> HtmlInput input = page.getHtmlElementById("PY_txt"); >>> input.type("328"); >>> >>> final HtmlPage page2 = page.getHtmlElementById("imgHKStockSubmit").click(); >>> System.out.println(page2.getUrl()); >>> System.out.println(page2.asText()); >>> } >>> >>> From: "htm...@li... <mailto:htm...@li...>" <htm...@li... <mailto:htm...@li...>> >>> Sent: Saturday, September 26, 2015 8:41 AM >>> ----- Forwarded Message ----- >>> >>> The attached message has been automatically discarded. >>> am completely new to HtmlUnit and I do not really know how to read and understand the page source of a website. Nonetheless,I have written code (learned from this tutorial <http://htmlunit.sourceforge.net/gettingStarted.html>)to try and access the following website >>> Then I am stuck, as I am not familiar with javascript. This is what I want to achieve: >>> I would like to type into 328 to the textfield on the left menu on that website >>> and click submit button >>> So that I can be brought to the next page. >>> However, with the code that I have written so far. I am NOT able to locate the input text field on the left menu of the website and click the submit button. Can someone show me how this can be done please? Thanks >>> public void testing() throws Exception { >>> /* turn off annoying htmlunit warnings */ >>> java.util.logging.Logger.getLogger("com.gargoylesoftware").setLevel(java.util.logging.Level.OFF); >>> try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { >>> final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/DetailQuote.aspx?&symbol=1 <http://www.aastocks.com/en/stock/DetailQuote.aspx?&symbol=1>"); >>> final HtmlDivision div = page.getHtmlElementById("LeftMenu_Button"); >>> } >>> } >>> >>> >>> >>> <Mail Attachment.eml> >> >> >> > > > > <Screen Shot 2015-09-27 at 1.29.50 PM.png> |
From: Ronald B. <rb...@rb...> - 2015-09-27 14:10:34
|
Hi, as far as i can see you got only warnings not errors: WARNING: Obsolete content type encountered: 'application/x-javascript'. This informs you that the web site uses a no longer valid content type. HtmlUnit still processes these files correct like the browsers are doing. You can simply ignore this WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, <COMMA>.) Which version of HtmlUnit and CSS Parser do you use? RBRi On Sun, 27 Sep 2015 14:07:11 +0800 Tom(Desean) Ng wrote: > >Hi, > >I believe I have finally subscribed with the right email address here. > >I was using the code to 1) get access to the website, 2) type some input in the left menu and then 3) click submit , in order to land on the second page and download that page's cookies. >Below is the code that I used. But I got a list of errors. What is the cause ? How can i overcome this? Thanks > >DeSean > >> >> >> try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { >> >> final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/detailquote.aspx?&symbol=1 <http://www.aastocks.com/en/stock/detailquote.aspx?&symbol=1> >> "); >> >> HtmlInput input = page.getHtmlElementById("PY_txt"); >> input.type("1"); >> final HtmlPage page2 = page.getHtmlElementById("imgHKStockSubmit").click(); >> System.out.println(page2.getUrl()); >> System.out.println(page2.asText()); >> System.out.println("***************************** Cookies:"); >> System.out.println(webClient.getCookieManager().getCookies()); >> >> >> The error message is listed below: >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:34 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:34 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, ><LBRACE>, <COMMA>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, ><LBRACE>, <COMMA>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, ><LBRACE>, <COMMA>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' >found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' >found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' >found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", ><COMMA>, <HASH>, <S>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", ><COMMA>, <HASH>, <S>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", >".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", ><COMMA>, <HASH>, <S>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", >".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, >".", ":", "[", <COMMA>, <HASH>, <S>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, >".", ":", "[", <COMMA>, <HASH>, <S>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:12859] Error in style sheet. (Invalid token "}". Was expecting one of: <EOF>, <S>, <IDENT>, "<!--", "-->", >".", ":", "*", "[", <HASH>, <IMPORT_SYM>, <PAGE_SYM>, <MEDIA_SYM>, <FONT_FACE_SYM>, <ATKEYWORD>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, >".", ":", "[", <COMMA>, <HASH>, <S>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/ContentLeftMenu_en.css' <http://www.aastocks.com/en/Style/ContentLeftMenu_en.css'> [1:2] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:38 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:39 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:40 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:41 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies >> WARNING: Cookie rejected [test_cookie="CheckForPermission", version:0, domain:doubleclick.net, path:/, expiry:Sun Sep 27 13:49:40 HKT 2015] Illegal 'domain' attribute "doubleclick.net <http://doubleclick.net/>". Domain of origin: >"pagead2.googlesyndication.com <http://pagead2.googlesyndication.com/>" >> Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:41 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument close >> WARNING: close() called when document is not open. >> Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument close >> WARNING: close() called when document is not open. >> Sep 27, 2015 1:34:42 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument close >> WARNING: close() called when document is not open. >> Sep 27, 2015 1:34:43 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:44 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. > > > > >> On Sep 27, 2015, at 1:43 PM, Ahmed Ashour <asa...@ya...> wrote: >> >> Hi, >> >> tho...@gm... <https://lists.sourceforge.net/lists/options/htmlunit-user/thomastskng--at--gmail.com> is subscribed, but not @googlemail.com >> >> Ahmed >> >> From: Tom(Desean) Ng <tho...@go...> >> To: Ahmed Ashour <asa...@ya...>; "htm...@li..." <htm...@li...> >> Cc: Tom(Desean) Ng <tho...@go...> >> Sent: Sunday, September 27, 2015 7:38 AM >> Subject: Re: Fail to locate the input text field on left menu as well >> >> I subscribed to the mailing list yesterday via http://htmlunit.sourceforge.net/mail-lists.html <http://htmlunit.sourceforge.net/mail-lists.html>. I am not sure if I have submitted to the wrong thing though. (Please see the attached image). >Please correct me if I did. >> >> I was basically using the code you provided. >> >> try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { >> >> final HtmlPage page = webClient.getPage("http://www.aastocks.com/en/stock/detailquote.aspx?&symbol=1 <http://www.aastocks.com/en/stock/detailquote.aspx?&symbol=1> >> "); >> >> HtmlInput input = page.getHtmlElementById("PY_txt"); >> input.type("1"); >> final HtmlPage page2 = page.getHtmlElementById("imgHKStockSubmit").click(); >> System.out.println(page2.getUrl()); >> System.out.println(page2.asText()); >> System.out.println("***************************** Cookies:"); >> System.out.println(webClient.getCookieManager().getCookies()); >> >> >> The error message is listed below: >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:32 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:34 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:34 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'application/x-javascript'. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify >> WARNING: Obsolete content type encountered: 'text/javascript'. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, ><LBRACE>, <COMMA>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, ><LBRACE>, <COMMA>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, ><LBRACE>, <COMMA>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css' <http://www.aastocks.com/en/Style/Stock/BasicQuote_en.css'> [2:1] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' >found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' >found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3' <http://www.aastocks.com/en/Style/TopNatvigation/ddlevelsmenu-base_en.css?v=1.3%27> [202:19] Error in expression; ':' >found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [104:392] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Error in style rule. (Invalid token "@media". Was expecting one of: <S>, <LBRACE>, ".", ":", "[", ><COMMA>, <HASH>, <S>.) >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error >> WARNING: CSS error: 'http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css' <http://www.aastocks.com/en/style/default/jquery-ui-1.8.14.custom.css'> [106:110] Error in expression; ':' found after identifier "progid". >> Sep 27, 2015 1:34:35 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler warning >> WARNING: CSS warning: 'http://www.aastocks.com/en/Style/Master_en.css' <http://www.aastocks.com/en/Style/Master_en.css'> [1:2] Ignoring the following declarations in this rule. >> Sep 27, 2015 1:34:35 PM com.gargoyles > >============================================================ > --- MESSAGE PREVIEW TRUNCATED --- >============================================================ > >Due to its length this message preview has been truncated. >To view this message in its entirety double-click the message to open it in the Read window. > |