You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(17) |
Aug
(18) |
Sep
(22) |
Oct
(16) |
Nov
(6) |
Dec
(11) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(11) |
Feb
(10) |
Mar
(34) |
Apr
(26) |
May
(6) |
Jun
(22) |
Jul
(14) |
Aug
(4) |
Sep
(47) |
Oct
(69) |
Nov
(23) |
Dec
(21) |
2005 |
Jan
(53) |
Feb
(33) |
Mar
(92) |
Apr
(65) |
May
(63) |
Jun
(57) |
Jul
(43) |
Aug
(132) |
Sep
(61) |
Oct
(75) |
Nov
(60) |
Dec
(130) |
2006 |
Jan
(74) |
Feb
(87) |
Mar
(101) |
Apr
(58) |
May
(54) |
Jun
(42) |
Jul
(31) |
Aug
(67) |
Sep
(61) |
Oct
(71) |
Nov
(28) |
Dec
(58) |
2007 |
Jan
(53) |
Feb
(50) |
Mar
(96) |
Apr
(66) |
May
(55) |
Jun
(130) |
Jul
(99) |
Aug
(115) |
Sep
(37) |
Oct
(78) |
Nov
(24) |
Dec
(70) |
2008 |
Jan
(94) |
Feb
(85) |
Mar
(197) |
Apr
(274) |
May
(119) |
Jun
(143) |
Jul
(193) |
Aug
(99) |
Sep
(160) |
Oct
(120) |
Nov
(178) |
Dec
(109) |
2009 |
Jan
(238) |
Feb
(169) |
Mar
(115) |
Apr
(109) |
May
(131) |
Jun
(167) |
Jul
(144) |
Aug
(193) |
Sep
(155) |
Oct
(154) |
Nov
(97) |
Dec
(127) |
2010 |
Jan
(108) |
Feb
(127) |
Mar
(176) |
Apr
(113) |
May
(130) |
Jun
(200) |
Jul
(115) |
Aug
(80) |
Sep
(92) |
Oct
(101) |
Nov
(124) |
Dec
(53) |
2011 |
Jan
(67) |
Feb
(144) |
Mar
(88) |
Apr
(60) |
May
(89) |
Jun
(54) |
Jul
(68) |
Aug
(81) |
Sep
(48) |
Oct
(40) |
Nov
(10) |
Dec
(20) |
2012 |
Jan
(21) |
Feb
(28) |
Mar
(17) |
Apr
(35) |
May
(41) |
Jun
(44) |
Jul
(68) |
Aug
(67) |
Sep
(89) |
Oct
(58) |
Nov
(47) |
Dec
(56) |
2013 |
Jan
(49) |
Feb
(28) |
Mar
(46) |
Apr
(31) |
May
(28) |
Jun
(37) |
Jul
(34) |
Aug
(52) |
Sep
(42) |
Oct
(108) |
Nov
(59) |
Dec
(56) |
2014 |
Jan
(41) |
Feb
(72) |
Mar
(46) |
Apr
(21) |
May
(19) |
Jun
(17) |
Jul
(15) |
Aug
(40) |
Sep
(11) |
Oct
(3) |
Nov
(5) |
Dec
(31) |
2015 |
Jan
(11) |
Feb
(12) |
Mar
(19) |
Apr
(19) |
May
(38) |
Jun
(54) |
Jul
(14) |
Aug
(42) |
Sep
(14) |
Oct
(16) |
Nov
(26) |
Dec
(14) |
2016 |
Jan
(3) |
Feb
(1) |
Mar
(24) |
Apr
(5) |
May
(15) |
Jun
(14) |
Jul
(33) |
Aug
(19) |
Sep
(8) |
Oct
(10) |
Nov
|
Dec
(2) |
2017 |
Jan
(16) |
Feb
(12) |
Mar
(23) |
Apr
(8) |
May
(11) |
Jun
(20) |
Jul
(21) |
Aug
(20) |
Sep
|
Oct
(6) |
Nov
(9) |
Dec
(2) |
2018 |
Jan
(7) |
Feb
(5) |
Mar
(6) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
|
Dec
(4) |
2019 |
Jan
(2) |
Feb
(2) |
Mar
(3) |
Apr
(4) |
May
|
Jun
(4) |
Jul
(9) |
Aug
(2) |
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(7) |
2020 |
Jan
(2) |
Feb
(6) |
Mar
(9) |
Apr
(1) |
May
(1) |
Jun
(15) |
Jul
(1) |
Aug
(1) |
Sep
(2) |
Oct
(6) |
Nov
(3) |
Dec
(5) |
2021 |
Jan
(3) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(6) |
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ahmed A. <asa...@ya...> - 2014-02-05 08:57:59
|
Hi, This happens when HtmlUnit determines the content type of this page to be plain text, not HTML. Please send the details of the complete case. Ahmed ________________________________ From: Sreenath <sre...@gm...> To: "htm...@li..." <htm...@li...> Sent: Wednesday, February 5, 2014 11:53 AM Subject: [Htmlunit-user] java.lang.ClassCastException: com.gargoylesoftware.htmlunit.TextPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage Hello, I have tried to load pme web page url and did submission of the page, second page is not getting loaded due to following issue. java.lang.ClassCastException: com.gargoylesoftware.htmlunit.TextPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage Note: my page is type of HtmlPage, not able to cast to HtmlPage Please advice why the second page is coming as type of com.gargoylesoftware.htmlunit.TextPage, and how can assign to HtmlPage type the same. Thanks in Advance Sreenadh |
From: Sreenath <sre...@gm...> - 2014-02-05 08:53:19
|
Hello, I have tried to load pme web page url and did submission of the page, second page is not getting loaded due to following issue. java.lang.ClassCastException: com.gargoylesoftware.htmlunit.TextPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage Note: my page is type of HtmlPage, not able to cast to HtmlPage Please advice why the second page is coming as type of com.gargoylesoftware.htmlunit.TextPage, and how can assign to HtmlPage type the same. Thanks in Advance Sreenadh -- If you judge people, you have no time to love them. |
From: asashour <asa...@ya...> - 2014-02-05 00:39:48
|
Hi, The last fix was for the class and properties, now it is fine for methods as well. Please get latest code and hint if you have any issue. Ahmed stergios wrote > I updated the source and now the Java class is initialized as it should > however I was not able to call any method from the corresponding class. > > DEBUG [main] write: Object Loaded! > <br> > ERROR [main] runtimeError: message=[Java method "playVideo" was invoked > with [object HTMLObjectElement] as "this" value that can not be converted > to Java type WMP.] sourceName=[.......objecttagtesting.html from (4, 9) to > (12, 10)] line=[8] lineSource=[null] lineOffset=[0] > INFO [main] Caught script exception -- View this message in context: http://htmlunit.10904.n7.nabble.com/Map-bject-to-custom-JavaClass-tp32980p33061.html Sent from the HtmlUnit - General mailing list archive at Nabble.com. |
From: Ahmed A. <asa...@ya...> - 2014-02-03 16:00:15
|
Hi David, Please remove ~/.m2/repository and try again. Ahmed ________________________________ From: David Michael Gang <mic...@gm...> To: htm...@li... Sent: Monday, February 3, 2014 6:15 PM Subject: Re: [Htmlunit-user] htmlunit dies on page Hi, I still get these errors. I use the latest snapshot from maven. Thanks, David |
From: Ronald B. <rb...@rb...> - 2014-02-03 15:41:32
|
using the same here and at least the htmlunit tests are running.... On Mon, 3 Feb 2014 17:12:33 +0200 David Michael Gang wrote: > >Hi, > >I get still the error. >The snapshot i use has the timestamp htmlunit-core-js-2.14-20140203.084841-5 > >What can i check else? > >Thanks, >David > > > >On Mon, Feb 3, 2014 at 4:36 PM, <htm...@li... >> wrote: > >> Send Htmlunit-user mailing list submissions to >> htm...@li... >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> or, via email, send a message with subject or body 'help' to >> htm...@li... >> >> You can reach the person managing the list at >> htm...@li... >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Htmlunit-user digest..." >> >> >> Today's Topics: >> >> 1. Re: htmlunit dies on page (David Michael Gang) >> 2. Re: htmlunit dies on page (Ronald Brill) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Mon, 3 Feb 2014 16:34:16 +0200 >> From: David Michael Gang <mic...@gm...> >> Subject: Re: [Htmlunit-user] htmlunit dies on page >> To: htm...@li... >> Message-ID: >> < >> CAJ...@ma...> >> Content-Type: text/plain; charset="iso-8859-1" >> >> Hi, >> >> Is the new version available through maven? >> >> Thanks, >> David >> >> >> >> >> > ------------------------------ >> > >> > Message: 2 >> > Date: Mon, 03 Feb 2014 15:26:04 +0100 (CET) >> > From: "Ronald Brill" <rb...@rb...> >> > Subject: Re: [Htmlunit-user] htmlunit dies on page >> > To: "htm...@li..." >> > <htm...@li...> >> > Message-ID: <100...@rb...> >> > Content-Type: text/plain; charset="iso-8859-15" >> > >> > Hi David, >> > >> > at the moment we have some problems with our build environment. I had the >> > same problems yesterday but this should be solved now. >> > Please use the latest snapshot (did a refresh some minutes before) and >> > make sure you also refresh the core-js thing. >> > I guess this will solve your problem. >> > >> > RBRi >> > >> > On Mon, 3 Feb 2014 16:12:39 +0200 David Michael Gang wrote: >> > > >> > >Hi all, >> > > >> > >I run the following class >> > > >> > >package test; >> > > >> > >import java.io.IOException; >> > >import java.net.MalformedURLException; >> > > >> > >import com.gargoylesoftware.htmlunit.BrowserVersion; >> > >import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; >> > >import com.gargoylesoftware.htmlunit.ImmediateRefreshHandler; >> > >import com.gargoylesoftware.htmlunit.Page; >> > >import com.gargoylesoftware.htmlunit.WebClient; >> > >import com.gargoylesoftware.htmlunit.html.HtmlPage; >> > > >> > >public class Redalcyc { >> > > >> > > public static void main(String[] args) throws >> > >FailingHttpStatusCodeException, MalformedURLException, IOException { >> > > // TODO Auto-generated method stub >> > > String url = "http://www.redalyc.org/articulo.oa?id=35700204"; >> > > WebClient client = new WebClient(BrowserVersion.FIREFOX_24); >> > > client.setRefreshHandler(new ImmediateRefreshHandler()); >> > > final HtmlPage page = client.getPage(url); >> > > System.out.println(page.asText()); >> > > } >> > > >> > >} >> > > >> > > >> > >and get: >> > >03/02/2014 16:07:11 >> > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >> > >notify >> > >WARNING: Obsolete content type encountered: 'text/javascript'. >> > >03/02/2014 16:07:20 >> > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >> > >notify >> > >WARNING: Obsolete content type encountered: 'text/javascript'. >> > >03/02/2014 16:07:21 >> > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >> > >notify >> > >WARNING: Obsolete content type encountered: 'application/x-javascript'. >> > >Exception in thread "main" ======= EXCEPTION START ======== >> > >Exception class=[java.lang.NullPointerException] >> > >com.gargoylesoftware.htmlunit.ScriptException >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:689) >> > > at >> > >> >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) >> > > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown >> > >Source) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) >> > > at >> > >> > >> >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) >> > > at >> > >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) >> > > at >> > >> > >> >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) >> > > at >> > >> > >> >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) >> > > at >> > >> > >> >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) >> > > at >> > >> >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) >> > > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) >> > > at >> > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) >> > > at >> > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) >> > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) >> > > at >> > >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) >> > > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) >> > > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) >> > > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) >> > > at test.Redalcyc.main(Redalcyc.java:19) >> > >Caused by: java.lang.NullPointerException >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) >> > > ... 30 more >> > >Enclosed exception: >> > >java.lang.NullPointerException >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) >> > > at >> > >> >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) >> > > at >> > >> > >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) >> > > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown >> > >Source) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) >> > > at >> > >> > >> >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) >> > > at >> > >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) >> > > at >> > >> > >> >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) >> > > at >> > >> > >> >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) >> > > at >> > >> > >> >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) >> > > at >> > >> >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) >> > > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) >> > > at >> > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) >> > > at >> > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) >> > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) >> > > at >> > >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) >> > > at >> > >> > >> >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) >> > > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) >> > > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) >> > > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) >> > > at test.Redalcyc.main(Redalcyc.java:19) >> > >======= EXCEPTION END ======== >> > >With firefox i don't get this error. I checked in the web console and >> did >> > >not see it. >> > >Do i have to change any configuration, so that ir will work? >> > >I use htmlunit 2.14 snapshot. >> > >Thanks, >> > >David >> > > >> > >> > >> > >> > >> > ------------------------------ >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Managing the Performance of Cloud-Based Applications >> > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. >> > Read the Whitepaper. >> > >> > >> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk >> > >> > ------------------------------ >> > >> > _______________________________________________ >> > Htmlunit-user mailing list >> > Htm...@li... >> > https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> > >> > >> > End of Htmlunit-user Digest, Vol 93, Issue 2 >> > ******************************************** >> > >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> >> ------------------------------ >> >> Message: 2 >> Date: Mon, 03 Feb 2014 15:36:37 +0100 (CET) >> From: "Ronald Brill" <rb...@rb...> >> Subject: Re: [Htmlunit-user] htmlunit dies on page >> To: "htm...@li..." >> <htm...@li...> >> Message-ID: <100...@rb...> >> Content-Type: text/plain; charset="iso-8859-15" >> >> Yes >> >> On Mon, 3 Feb 2014 16:34:16 +0200 David Michael Gang wrote: >> > >> >Hi, >> > >> >Is the new version available through maven? >> > >> >Thanks, >> >David >> > >> > >> > >> > >> >> ------------------------------ >> >> >> >> Message: 2 >> >> Date: Mon, 03 Feb 2014 15:26:04 +0100 (CET) >> >> From: "Ronald Brill" <rb...@rb...> >> >> Subject: Re: [Htmlunit-user] htmlunit dies on page >> >> To: "htm...@li..." >> >> <htm...@li...> >> >> Message-ID: <100...@rb...> >> >> Content-Type: text/plain; charset="iso-8859-15" >> >> >> >> Hi David, >> >> >> >> at the moment we have some problems with our build environment. I had >> the >> >> same problems yesterday but this should be solved now. >> >> Please use the latest snapshot (did a refresh some minutes before) and >> >> make sure you also refresh the core-js thing. >> >> I guess this will solve your problem. >> >> >> >> RBRi >> >> >> >> On Mon, 3 Feb 2014 16:12:39 +0200 David Michael Gang wrote: >> >> > >> >> >Hi all, >> >> > >> >> >I run the following class >> >> > >> >> >package test; >> >> > >> >> >import java.io.IOException; >> >> >import java.net.MalformedURLException; >> >> > >> >> >import com.gargoylesoftware.htmlunit.BrowserVersion; >> >> >import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; >> >> >import com.gargoylesoftware.htmlunit.ImmediateRefreshHandler; >> >> >import com.gargoylesoftware.htmlunit.Page; >> >> >import com.gargoylesoftware.htmlunit.WebClient; >> >> >import com.gargoylesoftware.htmlunit.html.HtmlPage; >> >> > >> >> >public class Redalcyc { >> >> > >> >> > public static void main(String[] args) throws >> >> >FailingHttpStatusCodeException, MalformedURLException, IOException { >> >> > // TODO Auto-generated method stub >> >> > String url = "http://www.redalyc.org/articulo.oa?id=35700204"; >> >> > WebClient client = new WebClient(BrowserVersion.FIREFOX_24); >> >> > client.setRefreshHandler(new ImmediateRefreshHandler()); >> >> > final HtmlPage page = client.getPage(url); >> >> > System.out.println(page.asText()); >> >> > } >> >> > >> >> >} >> >> > >> >> > >> >> >and get: >> >> >03/02/2014 16:07:11 >> >> com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >> >> >notify >> >> >WARNING: Obsolete content type encountered: 'text/javascript'. >> >> >03/02/2014 16:07:20 >> >> com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >> >> >notify >> >> >WARNING: Obsolete content type encountered: 'text/javascript'. >> >> >03/02/2014 16:07:21 >> >> com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >> >> >notify >> >> >WARNING: Obsolete content type encountered: 'application/x-javascript'. >> >> >Exception in thread "main" ======= EXCEPTION START ======== >> >> >Exception class=[java.lang.NullPointerException] >> >> >com.gargoylesoftware.htmlunit.ScriptException >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:689) >> >> > at >> >> >> >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) >> >> > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown >> >> >Source) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) >> >> > at >> >> >> >> >> >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) >> >> > at >> >> >> >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) >> >> > at >> >> >> >> >> >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) >> >> > at >> >> >> >> >> >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) >> >> > at >> >> >> >> >> >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) >> >> > at >> >> >> >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) >> >> > at >> org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) >> >> > at >> >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) >> >> > at >> >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) >> >> > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) >> >> > at >> >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) >> >> > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) >> >> > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) >> >> > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) >> >> > at test.Redalcyc.main(Redalcyc.java:19) >> >> >Caused by: java.lang.NullPointerException >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) >> >> > ... 30 more >> >> >Enclosed exception: >> >> >java.lang.NullPointerException >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) >> >> > at >> >> >> >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) >> >> > at >> >> >> >> >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) >> >> > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown >> >> >Source) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) >> >> > at >> >> >> >> >> >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) >> >> > at >> >> >> >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) >> >> > at >> >> >> >> >> >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) >> >> > at >> >> >> >> >> >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) >> >> > at >> >> >> >> >> >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) >> >> > at >> >> >> >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) >> >> > at >> org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) >> >> > at >> >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) >> >> > at >> >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) >> >> > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) >> >> > at >> >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) >> >> > at >> >> >> >> >> >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) >> >> > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) >> >> > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) >> >> > at >> com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) >> >> > at test.Redalcyc.main(Redalcyc.java:19) >> >> >======= EXCEPTION END ======== >> >> >With firefox i don't get this error. I checked in the web console and >> did >> >> >not see it. >> >> >Do i have to change any configuration, so that ir will work? >> >> >I use htmlunit 2.14 snapshot. >> >> >Thanks, >> >> >David >> >> > >> >> >> >> >> >> >> >> >> >> ------------------------------ >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Managing the Performance of Cloud-Based Applications >> >> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. >> >> Read the Whitepaper. >> >> >> >> >> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk >> >> >> >> ------------------------------ >> >> >> >> _______________________________________________ >> >> Htmlunit-user mailing list >> >> Htm...@li... >> >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> >> >> >> >> >> End of Htmlunit-user Digest, Vol 93, Issue 2 >> >> ******************************************** >> >> >> > >> >> >> >> >> ------------------------------ >> >> >> ------------------------------------------------------------------------------ >> Managing the Performance of Cloud-Based Applications >> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. >> Read the Whitepaper. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk >> >> ------------------------------ >> >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> >> >> End of Htmlunit-user Digest, Vol 93, Issue 3 >> ******************************************** >> > |
From: David M. G. <mic...@gm...> - 2014-02-03 15:16:05
|
Hi, I still get these errors. I use the latest snapshot from maven. Thanks, David On Mon, Feb 3, 2014 at 4:36 PM, <htm...@li... > wrote: > Send Htmlunit-user mailing list submissions to > htm...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > or, via email, send a message with subject or body 'help' to > htm...@li... > > You can reach the person managing the list at > htm...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Htmlunit-user digest..." > > > Today's Topics: > > 1. Re: htmlunit dies on page (David Michael Gang) > 2. Re: htmlunit dies on page (Ronald Brill) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 3 Feb 2014 16:34:16 +0200 > From: David Michael Gang <mic...@gm...> > Subject: Re: [Htmlunit-user] htmlunit dies on page > To: htm...@li... > Message-ID: > < > CAJ...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > Is the new version available through maven? > > Thanks, > David > > > > > > ------------------------------ > > > > Message: 2 > > Date: Mon, 03 Feb 2014 15:26:04 +0100 (CET) > > From: "Ronald Brill" <rb...@rb...> > > Subject: Re: [Htmlunit-user] htmlunit dies on page > > To: "htm...@li..." > > <htm...@li...> > > Message-ID: <100...@rb...> > > Content-Type: text/plain; charset="iso-8859-15" > > > > Hi David, > > > > at the moment we have some problems with our build environment. I had the > > same problems yesterday but this should be solved now. > > Please use the latest snapshot (did a refresh some minutes before) and > > make sure you also refresh the core-js thing. > > I guess this will solve your problem. > > > > RBRi > > > > On Mon, 3 Feb 2014 16:12:39 +0200 David Michael Gang wrote: > > > > > >Hi all, > > > > > >I run the following class > > > > > >package test; > > > > > >import java.io.IOException; > > >import java.net.MalformedURLException; > > > > > >import com.gargoylesoftware.htmlunit.BrowserVersion; > > >import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; > > >import com.gargoylesoftware.htmlunit.ImmediateRefreshHandler; > > >import com.gargoylesoftware.htmlunit.Page; > > >import com.gargoylesoftware.htmlunit.WebClient; > > >import com.gargoylesoftware.htmlunit.html.HtmlPage; > > > > > >public class Redalcyc { > > > > > > public static void main(String[] args) throws > > >FailingHttpStatusCodeException, MalformedURLException, IOException { > > > // TODO Auto-generated method stub > > > String url = "http://www.redalyc.org/articulo.oa?id=35700204"; > > > WebClient client = new WebClient(BrowserVersion.FIREFOX_24); > > > client.setRefreshHandler(new ImmediateRefreshHandler()); > > > final HtmlPage page = client.getPage(url); > > > System.out.println(page.asText()); > > > } > > > > > >} > > > > > > > > >and get: > > >03/02/2014 16:07:11 > > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > > >notify > > >WARNING: Obsolete content type encountered: 'text/javascript'. > > >03/02/2014 16:07:20 > > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > > >notify > > >WARNING: Obsolete content type encountered: 'text/javascript'. > > >03/02/2014 16:07:21 > > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > > >notify > > >WARNING: Obsolete content type encountered: 'application/x-javascript'. > > >Exception in thread "main" ======= EXCEPTION START ======== > > >Exception class=[java.lang.NullPointerException] > > >com.gargoylesoftware.htmlunit.ScriptException > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:689) > > > at > > > >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) > > > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > > >Source) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) > > > at > > > > > >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) > > > at > > >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) > > > at > > > > > >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) > > > at > > > > > >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) > > > at > > > > > >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) > > > at > > > >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) > > > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) > > > at > > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) > > > at > > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) > > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) > > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) > > > at > > > |
From: David M. G. <mic...@gm...> - 2014-02-03 15:12:45
|
Hi, I get still the error. The snapshot i use has the timestamp htmlunit-core-js-2.14-20140203.084841-5 What can i check else? Thanks, David On Mon, Feb 3, 2014 at 4:36 PM, <htm...@li... > wrote: > Send Htmlunit-user mailing list submissions to > htm...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > or, via email, send a message with subject or body 'help' to > htm...@li... > > You can reach the person managing the list at > htm...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Htmlunit-user digest..." > > > Today's Topics: > > 1. Re: htmlunit dies on page (David Michael Gang) > 2. Re: htmlunit dies on page (Ronald Brill) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 3 Feb 2014 16:34:16 +0200 > From: David Michael Gang <mic...@gm...> > Subject: Re: [Htmlunit-user] htmlunit dies on page > To: htm...@li... > Message-ID: > < > CAJ...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > Is the new version available through maven? > > Thanks, > David > > > > > > ------------------------------ > > > > Message: 2 > > Date: Mon, 03 Feb 2014 15:26:04 +0100 (CET) > > From: "Ronald Brill" <rb...@rb...> > > Subject: Re: [Htmlunit-user] htmlunit dies on page > > To: "htm...@li..." > > <htm...@li...> > > Message-ID: <100...@rb...> > > Content-Type: text/plain; charset="iso-8859-15" > > > > Hi David, > > > > at the moment we have some problems with our build environment. I had the > > same problems yesterday but this should be solved now. > > Please use the latest snapshot (did a refresh some minutes before) and > > make sure you also refresh the core-js thing. > > I guess this will solve your problem. > > > > RBRi > > > > On Mon, 3 Feb 2014 16:12:39 +0200 David Michael Gang wrote: > > > > > >Hi all, > > > > > >I run the following class > > > > > >package test; > > > > > >import java.io.IOException; > > >import java.net.MalformedURLException; > > > > > >import com.gargoylesoftware.htmlunit.BrowserVersion; > > >import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; > > >import com.gargoylesoftware.htmlunit.ImmediateRefreshHandler; > > >import com.gargoylesoftware.htmlunit.Page; > > >import com.gargoylesoftware.htmlunit.WebClient; > > >import com.gargoylesoftware.htmlunit.html.HtmlPage; > > > > > >public class Redalcyc { > > > > > > public static void main(String[] args) throws > > >FailingHttpStatusCodeException, MalformedURLException, IOException { > > > // TODO Auto-generated method stub > > > String url = "http://www.redalyc.org/articulo.oa?id=35700204"; > > > WebClient client = new WebClient(BrowserVersion.FIREFOX_24); > > > client.setRefreshHandler(new ImmediateRefreshHandler()); > > > final HtmlPage page = client.getPage(url); > > > System.out.println(page.asText()); > > > } > > > > > >} > > > > > > > > >and get: > > >03/02/2014 16:07:11 > > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > > >notify > > >WARNING: Obsolete content type encountered: 'text/javascript'. > > >03/02/2014 16:07:20 > > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > > >notify > > >WARNING: Obsolete content type encountered: 'text/javascript'. > > >03/02/2014 16:07:21 > > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > > >notify > > >WARNING: Obsolete content type encountered: 'application/x-javascript'. > > >Exception in thread "main" ======= EXCEPTION START ======== > > >Exception class=[java.lang.NullPointerException] > > >com.gargoylesoftware.htmlunit.ScriptException > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:689) > > > at > > > >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) > > > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > > >Source) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) > > > at > > > > > >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) > > > at > > >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) > > > at > > > > > >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) > > > at > > > > > >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) > > > at > > > > > >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) > > > at > > > >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) > > > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) > > > at > > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) > > > at > > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) > > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) > > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) > > > at > > > > > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) > > > at > > > > > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) > > > at > > > > > >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) > > > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > > > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) > > > at test.Redalcyc.main(Redalcyc.java:19) > > >Caused by: java.lang.NullPointerException > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) > > > ... 30 more > > >Enclosed exception: > > >java.lang.NullPointerException > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) > > > at > > > >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) > > > at > > > > > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) > > > at > > > > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) > > > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > > >Source) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) > > > at > > > > > >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) > > > at > > >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) > > > at > > > > > >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) > > > at > > > > > >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) > > > at > > > > > >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) > > > at > > > >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) > > > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) > > > at > > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) > > > at > > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) > > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) > > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) > > > at > > > > > >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) > > > at > > > > > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) > > > at > > > > > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) > > > at > > > > > >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) > > > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > > > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) > > > at test.Redalcyc.main(Redalcyc.java:19) > > >======= EXCEPTION END ======== > > >With firefox i don't get this error. I checked in the web console and > did > > >not see it. > > >Do i have to change any configuration, so that ir will work? > > >I use htmlunit 2.14 snapshot. > > >Thanks, > > >David > > > > > > > > > > > > > ------------------------------ > > > > > > > ------------------------------------------------------------------------------ > > Managing the Performance of Cloud-Based Applications > > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > > Read the Whitepaper. > > > > > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > > > > ------------------------------ > > > > _______________________________________________ > > Htmlunit-user mailing list > > Htm...@li... > > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > > > End of Htmlunit-user Digest, Vol 93, Issue 2 > > ******************************************** > > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 2 > Date: Mon, 03 Feb 2014 15:36:37 +0100 (CET) > From: "Ronald Brill" <rb...@rb...> > Subject: Re: [Htmlunit-user] htmlunit dies on page > To: "htm...@li..." > <htm...@li...> > Message-ID: <100...@rb...> > Content-Type: text/plain; charset="iso-8859-15" > > Yes > > On Mon, 3 Feb 2014 16:34:16 +0200 David Michael Gang wrote: > > > >Hi, > > > >Is the new version available through maven? > > > >Thanks, > >David > > > > > > > > > >> ------------------------------ > >> > >> Message: 2 > >> Date: Mon, 03 Feb 2014 15:26:04 +0100 (CET) > >> From: "Ronald Brill" <rb...@rb...> > >> Subject: Re: [Htmlunit-user] htmlunit dies on page > >> To: "htm...@li..." > >> <htm...@li...> > >> Message-ID: <100...@rb...> > >> Content-Type: text/plain; charset="iso-8859-15" > >> > >> Hi David, > >> > >> at the moment we have some problems with our build environment. I had > the > >> same problems yesterday but this should be solved now. > >> Please use the latest snapshot (did a refresh some minutes before) and > >> make sure you also refresh the core-js thing. > >> I guess this will solve your problem. > >> > >> RBRi > >> > >> On Mon, 3 Feb 2014 16:12:39 +0200 David Michael Gang wrote: > >> > > >> >Hi all, > >> > > >> >I run the following class > >> > > >> >package test; > >> > > >> >import java.io.IOException; > >> >import java.net.MalformedURLException; > >> > > >> >import com.gargoylesoftware.htmlunit.BrowserVersion; > >> >import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; > >> >import com.gargoylesoftware.htmlunit.ImmediateRefreshHandler; > >> >import com.gargoylesoftware.htmlunit.Page; > >> >import com.gargoylesoftware.htmlunit.WebClient; > >> >import com.gargoylesoftware.htmlunit.html.HtmlPage; > >> > > >> >public class Redalcyc { > >> > > >> > public static void main(String[] args) throws > >> >FailingHttpStatusCodeException, MalformedURLException, IOException { > >> > // TODO Auto-generated method stub > >> > String url = "http://www.redalyc.org/articulo.oa?id=35700204"; > >> > WebClient client = new WebClient(BrowserVersion.FIREFOX_24); > >> > client.setRefreshHandler(new ImmediateRefreshHandler()); > >> > final HtmlPage page = client.getPage(url); > >> > System.out.println(page.asText()); > >> > } > >> > > >> >} > >> > > >> > > >> >and get: > >> >03/02/2014 16:07:11 > >> com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > >> >notify > >> >WARNING: Obsolete content type encountered: 'text/javascript'. > >> >03/02/2014 16:07:20 > >> com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > >> >notify > >> >WARNING: Obsolete content type encountered: 'text/javascript'. > >> >03/02/2014 16:07:21 > >> com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > >> >notify > >> >WARNING: Obsolete content type encountered: 'application/x-javascript'. > >> >Exception in thread "main" ======= EXCEPTION START ======== > >> >Exception class=[java.lang.NullPointerException] > >> >com.gargoylesoftware.htmlunit.ScriptException > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:689) > >> > at > >> > >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) > >> > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > >> >Source) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) > >> > at > >> > >> > >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) > >> > at > >> > >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) > >> > at > >> > >> > >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) > >> > at > >> > >> > >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) > >> > at > >> > >> > >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) > >> > at > >> > >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) > >> > at > org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) > >> > at > >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) > >> > at > >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) > >> > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) > >> > at > >> > >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) > >> > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > >> > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > >> > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) > >> > at test.Redalcyc.main(Redalcyc.java:19) > >> >Caused by: java.lang.NullPointerException > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) > >> > ... 30 more > >> >Enclosed exception: > >> >java.lang.NullPointerException > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) > >> > at > >> > >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) > >> > at > >> > >> > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) > >> > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > >> >Source) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) > >> > at > >> > >> > >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) > >> > at > >> > >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) > >> > at > >> > >> > >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) > >> > at > >> > >> > >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) > >> > at > >> > >> > >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) > >> > at > >> > >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) > >> > at > org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) > >> > at > >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) > >> > at > >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) > >> > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) > >> > at > >> > >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) > >> > at > >> > >> > >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) > >> > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > >> > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > >> > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) > >> > at test.Redalcyc.main(Redalcyc.java:19) > >> >======= EXCEPTION END ======== > >> >With firefox i don't get this error. I checked in the web console and > did > >> >not see it. > >> >Do i have to change any configuration, so that ir will work? > >> >I use htmlunit 2.14 snapshot. > >> >Thanks, > >> >David > >> > > >> > >> > >> > >> > >> ------------------------------ > >> > >> > >> > ------------------------------------------------------------------------------ > >> Managing the Performance of Cloud-Based Applications > >> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > >> Read the Whitepaper. > >> > >> > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > >> > >> ------------------------------ > >> > >> _______________________________________________ > >> Htmlunit-user mailing list > >> Htm...@li... > >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user > >> > >> > >> End of Htmlunit-user Digest, Vol 93, Issue 2 > >> ******************************************** > >> > > > > > > > ------------------------------ > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > > ------------------------------ > > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > End of Htmlunit-user Digest, Vol 93, Issue 3 > ******************************************** > |
From: Ronald B. <rb...@rb...> - 2014-02-03 14:36:56
|
Yes On Mon, 3 Feb 2014 16:34:16 +0200 David Michael Gang wrote: > >Hi, > >Is the new version available through maven? > >Thanks, >David > > > > >> ------------------------------ >> >> Message: 2 >> Date: Mon, 03 Feb 2014 15:26:04 +0100 (CET) >> From: "Ronald Brill" <rb...@rb...> >> Subject: Re: [Htmlunit-user] htmlunit dies on page >> To: "htm...@li..." >> <htm...@li...> >> Message-ID: <100...@rb...> >> Content-Type: text/plain; charset="iso-8859-15" >> >> Hi David, >> >> at the moment we have some problems with our build environment. I had the >> same problems yesterday but this should be solved now. >> Please use the latest snapshot (did a refresh some minutes before) and >> make sure you also refresh the core-js thing. >> I guess this will solve your problem. >> >> RBRi >> >> On Mon, 3 Feb 2014 16:12:39 +0200 David Michael Gang wrote: >> > >> >Hi all, >> > >> >I run the following class >> > >> >package test; >> > >> >import java.io.IOException; >> >import java.net.MalformedURLException; >> > >> >import com.gargoylesoftware.htmlunit.BrowserVersion; >> >import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; >> >import com.gargoylesoftware.htmlunit.ImmediateRefreshHandler; >> >import com.gargoylesoftware.htmlunit.Page; >> >import com.gargoylesoftware.htmlunit.WebClient; >> >import com.gargoylesoftware.htmlunit.html.HtmlPage; >> > >> >public class Redalcyc { >> > >> > public static void main(String[] args) throws >> >FailingHttpStatusCodeException, MalformedURLException, IOException { >> > // TODO Auto-generated method stub >> > String url = "http://www.redalyc.org/articulo.oa?id=35700204"; >> > WebClient client = new WebClient(BrowserVersion.FIREFOX_24); >> > client.setRefreshHandler(new ImmediateRefreshHandler()); >> > final HtmlPage page = client.getPage(url); >> > System.out.println(page.asText()); >> > } >> > >> >} >> > >> > >> >and get: >> >03/02/2014 16:07:11 >> com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >> >notify >> >WARNING: Obsolete content type encountered: 'text/javascript'. >> >03/02/2014 16:07:20 >> com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >> >notify >> >WARNING: Obsolete content type encountered: 'text/javascript'. >> >03/02/2014 16:07:21 >> com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >> >notify >> >WARNING: Obsolete content type encountered: 'application/x-javascript'. >> >Exception in thread "main" ======= EXCEPTION START ======== >> >Exception class=[java.lang.NullPointerException] >> >com.gargoylesoftware.htmlunit.ScriptException >> > at >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:689) >> > at >> >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) >> > at >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) >> > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown >> >Source) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) >> > at >> >> >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) >> > at >> >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) >> > at >> >> >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) >> > at >> >> >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) >> > at >> >> >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) >> > at >> >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) >> > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) >> > at >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) >> > at >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) >> > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) >> > at >> >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) >> > at >> >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) >> > at >> >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) >> > at >> >> >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) >> > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) >> > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) >> > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) >> > at test.Redalcyc.main(Redalcyc.java:19) >> >Caused by: java.lang.NullPointerException >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) >> > at >> >> >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) >> > at >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) >> > at >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) >> > ... 30 more >> >Enclosed exception: >> >java.lang.NullPointerException >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) >> > at >> >> >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) >> > at >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) >> > at >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) >> > at >> >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) >> > at >> >> >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) >> > at >> >> >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) >> > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown >> >Source) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) >> > at >> >> >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) >> > at >> >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) >> > at >> >> >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) >> > at >> >> >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) >> > at >> >> >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) >> > at >> >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) >> > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) >> > at >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) >> > at >> >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) >> > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) >> > at >> >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) >> > at >> >> >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) >> > at >> >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) >> > at >> >> >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) >> > at >> >> >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) >> > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) >> > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) >> > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) >> > at test.Redalcyc.main(Redalcyc.java:19) >> >======= EXCEPTION END ======== >> >With firefox i don't get this error. I checked in the web console and did >> >not see it. >> >Do i have to change any configuration, so that ir will work? >> >I use htmlunit 2.14 snapshot. >> >Thanks, >> >David >> > >> >> >> >> >> ------------------------------ >> >> >> ------------------------------------------------------------------------------ >> Managing the Performance of Cloud-Based Applications >> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. >> Read the Whitepaper. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk >> >> ------------------------------ >> >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> >> >> End of Htmlunit-user Digest, Vol 93, Issue 2 >> ******************************************** >> > |
From: David M. G. <mic...@gm...> - 2014-02-03 14:34:26
|
Hi, Is the new version available through maven? Thanks, David > ------------------------------ > > Message: 2 > Date: Mon, 03 Feb 2014 15:26:04 +0100 (CET) > From: "Ronald Brill" <rb...@rb...> > Subject: Re: [Htmlunit-user] htmlunit dies on page > To: "htm...@li..." > <htm...@li...> > Message-ID: <100...@rb...> > Content-Type: text/plain; charset="iso-8859-15" > > Hi David, > > at the moment we have some problems with our build environment. I had the > same problems yesterday but this should be solved now. > Please use the latest snapshot (did a refresh some minutes before) and > make sure you also refresh the core-js thing. > I guess this will solve your problem. > > RBRi > > On Mon, 3 Feb 2014 16:12:39 +0200 David Michael Gang wrote: > > > >Hi all, > > > >I run the following class > > > >package test; > > > >import java.io.IOException; > >import java.net.MalformedURLException; > > > >import com.gargoylesoftware.htmlunit.BrowserVersion; > >import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; > >import com.gargoylesoftware.htmlunit.ImmediateRefreshHandler; > >import com.gargoylesoftware.htmlunit.Page; > >import com.gargoylesoftware.htmlunit.WebClient; > >import com.gargoylesoftware.htmlunit.html.HtmlPage; > > > >public class Redalcyc { > > > > public static void main(String[] args) throws > >FailingHttpStatusCodeException, MalformedURLException, IOException { > > // TODO Auto-generated method stub > > String url = "http://www.redalyc.org/articulo.oa?id=35700204"; > > WebClient client = new WebClient(BrowserVersion.FIREFOX_24); > > client.setRefreshHandler(new ImmediateRefreshHandler()); > > final HtmlPage page = client.getPage(url); > > System.out.println(page.asText()); > > } > > > >} > > > > > >and get: > >03/02/2014 16:07:11 > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > >notify > >WARNING: Obsolete content type encountered: 'text/javascript'. > >03/02/2014 16:07:20 > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > >notify > >WARNING: Obsolete content type encountered: 'text/javascript'. > >03/02/2014 16:07:21 > com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl > >notify > >WARNING: Obsolete content type encountered: 'application/x-javascript'. > >Exception in thread "main" ======= EXCEPTION START ======== > >Exception class=[java.lang.NullPointerException] > >com.gargoylesoftware.htmlunit.ScriptException > > at > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:689) > > at > >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) > > at > > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) > > at > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) > > at > > >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) > > at > > >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) > > at > > >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) > > at > > >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) > > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > >Source) > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) > > at > > >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) > > at > >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) > > at > > >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) > > at > > >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) > > at > > >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) > > at > >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) > > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) > > at > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) > > at > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) > > at > >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) > > at > > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) > > at > > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) > > at > > >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) > > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) > > at test.Redalcyc.main(Redalcyc.java:19) > >Caused by: java.lang.NullPointerException > > at > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) > > at > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) > > at > > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) > > at > > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) > > at > > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) > > at > > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) > > at > > >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) > > at > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) > > at > > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) > > at > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) > > at > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) > > ... 30 more > >Enclosed exception: > >java.lang.NullPointerException > > at > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) > > at > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) > > at > > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) > > at > > >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) > > at > > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) > > at > > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) > > at > > >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) > > at > > >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) > > at > > >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) > > at > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) > > at > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) > > at > >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) > > at > > >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) > > at > > >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) > > at > > >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) > > at > > >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) > > at > > >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) > > at > > >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) > > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > >Source) > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) > > at > > >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) > > at > >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) > > at > > >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) > > at > > >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) > > at > > >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) > > at > >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) > > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) > > at > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) > > at > >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) > > at > >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) > > at > > >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) > > at > > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) > > at > > >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) > > at > > >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) > > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) > > at test.Redalcyc.main(Redalcyc.java:19) > >======= EXCEPTION END ======== > >With firefox i don't get this error. I checked in the web console and did > >not see it. > >Do i have to change any configuration, so that ir will work? > >I use htmlunit 2.14 snapshot. > >Thanks, > >David > > > > > > > ------------------------------ > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > > ------------------------------ > > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > End of Htmlunit-user Digest, Vol 93, Issue 2 > ******************************************** > |
From: Ronald B. <rb...@rb...> - 2014-02-03 14:26:25
|
Hi David, at the moment we have some problems with our build environment. I had the same problems yesterday but this should be solved now. Please use the latest snapshot (did a refresh some minutes before) and make sure you also refresh the core-js thing. I guess this will solve your problem. RBRi On Mon, 3 Feb 2014 16:12:39 +0200 David Michael Gang wrote: > >Hi all, > >I run the following class > >package test; > >import java.io.IOException; >import java.net.MalformedURLException; > >import com.gargoylesoftware.htmlunit.BrowserVersion; >import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; >import com.gargoylesoftware.htmlunit.ImmediateRefreshHandler; >import com.gargoylesoftware.htmlunit.Page; >import com.gargoylesoftware.htmlunit.WebClient; >import com.gargoylesoftware.htmlunit.html.HtmlPage; > >public class Redalcyc { > > public static void main(String[] args) throws >FailingHttpStatusCodeException, MalformedURLException, IOException { > // TODO Auto-generated method stub > String url = "http://www.redalyc.org/articulo.oa?id=35700204"; > WebClient client = new WebClient(BrowserVersion.FIREFOX_24); > client.setRefreshHandler(new ImmediateRefreshHandler()); > final HtmlPage page = client.getPage(url); > System.out.println(page.asText()); > } > >} > > >and get: >03/02/2014 16:07:11 com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >notify >WARNING: Obsolete content type encountered: 'text/javascript'. >03/02/2014 16:07:20 com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >notify >WARNING: Obsolete content type encountered: 'text/javascript'. >03/02/2014 16:07:21 com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl >notify >WARNING: Obsolete content type encountered: 'application/x-javascript'. >Exception in thread "main" ======= EXCEPTION START ======== >Exception class=[java.lang.NullPointerException] >com.gargoylesoftware.htmlunit.ScriptException > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:689) > at >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) > at >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) > at >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) > at >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) > at >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) > at >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) > at >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown >Source) > at >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) > at >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) > at >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) > at >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) > at >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) > at >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) > at >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) > at >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) > at >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) > at >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) > at >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) > at >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) > at >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) > at >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) > at test.Redalcyc.main(Redalcyc.java:19) >Caused by: java.lang.NullPointerException > at >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) > at >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) > at >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) > at >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) > at >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) > at >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) > at >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) > at >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) > at >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) > ... 30 more >Enclosed exception: >java.lang.NullPointerException > at >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) > at >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) > at >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) > at >net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) > at >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) > at >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) > at >com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) > at >net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) > at >net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) > at >net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) > at >net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) > at >com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) > at >com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) > at >com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) > at >com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) > at >com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) > at >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown >Source) > at >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) > at >org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) > at >org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) > at >org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) > at >org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) > at >org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) > at >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) > at >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) > at >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) > at >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) > at >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) > at >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) > at >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) > at >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) > at test.Redalcyc.main(Redalcyc.java:19) >======= EXCEPTION END ======== >With firefox i don't get this error. I checked in the web console and did >not see it. >Do i have to change any configuration, so that ir will work? >I use htmlunit 2.14 snapshot. >Thanks, >David > |
From: David M. G. <mic...@gm...> - 2014-02-03 14:12:48
|
Hi all, I run the following class package test; import java.io.IOException; import java.net.MalformedURLException; import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; import com.gargoylesoftware.htmlunit.ImmediateRefreshHandler; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; public class Redalcyc { public static void main(String[] args) throws FailingHttpStatusCodeException, MalformedURLException, IOException { // TODO Auto-generated method stub String url = "http://www.redalyc.org/articulo.oa?id=35700204"; WebClient client = new WebClient(BrowserVersion.FIREFOX_24); client.setRefreshHandler(new ImmediateRefreshHandler()); final HtmlPage page = client.getPage(url); System.out.println(page.asText()); } } and get: 03/02/2014 16:07:11 com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify WARNING: Obsolete content type encountered: 'text/javascript'. 03/02/2014 16:07:20 com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify WARNING: Obsolete content type encountered: 'text/javascript'. 03/02/2014 16:07:21 com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify WARNING: Obsolete content type encountered: 'application/x-javascript'. Exception in thread "main" ======= EXCEPTION START ======== Exception class=[java.lang.NullPointerException] com.gargoylesoftware.htmlunit.ScriptException at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:689) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) at com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) at test.Redalcyc.main(Redalcyc.java:19) Caused by: java.lang.NullPointerException at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) ... 30 more Enclosed exception: java.lang.NullPointerException at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumChangeObject(ScriptRuntime.java:2106) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.enumNext(ScriptRuntime.java:2022) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1739) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3056) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:566) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:674) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:575) at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1067) at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:391) at com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:272) at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:702) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:662) at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170) at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072) at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330) at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126) at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093) at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379) at test.Redalcyc.main(Redalcyc.java:19) ======= EXCEPTION END ======== With firefox i don't get this error. I checked in the web console and did not see it. Do i have to change any configuration, so that ir will work? I use htmlunit 2.14 snapshot. Thanks, David |
From: smk s. <ste...@gm...> - 2014-02-02 08:14:52
|
Hi again, I updated the source and now the Java class is initialized as it should however I was not able to call any method from the corresponding class. In more details. *This is the testing html* <html> <body> <OBJECT id="obj" classid='clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6'> </OBJECT> <script> var obj = document.getElementById("obj"); if(obj != null){ document.write("Object Loaded!"+"<br>"); document.write(obj.playVideo("http://url.com")); }else{ document.write("Not Loaded"); } </script> </body> </html> *This is the Java class* public class WMP { public WMP(){ Log.info("Loaded"); } public String playVideo(String s){ return "Start playing from"+s; } } The object is mapped correctly and initialized correctly However when the method is called I get this exception *Exception* DEBUG [main] write: Object Loaded!<br> ERROR [main] runtimeError: message=[Java method "playVideo" was invoked with [object HTMLObjectElement] as "this" value that can not be converted to Java type WMP.] sourceName=[.......objecttagtesting.html from (4, 9) to (12, 10)] line=[8] lineSource=[null] lineOffset=[0] INFO [main] Caught script exception ======= EXCEPTION START ======== Exception class=[net.sourceforge.htmlunit.corejs.javascript.EvaluatorException] com.gargoylesoftware.htmlunit.ScriptException: Java method "playVideo" was invoked with [object HTMLObjectElement] as "this" value that can not be converted to Java type WMP. at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:689) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:602) ...........[SNIP] Caused by: net.sourceforge.htmlunit.corejs.javascript.EvaluatorException: Java method "playVideo" was invoked with [object HTMLObjectElement] as "this" value that can not be converted to Java type WMP. at com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter.runtimeError(StrictErrorReporter.java:81) at net.sourceforge.htmlunit.corejs.javascript.Context.reportRuntimeError(Context.java:1029) at net.sourceforge.htmlunit.corejs.javascript.Context.reportRuntimeError(Context.java:1076) ...........[SNIP] Enclosed exception: net.sourceforge.htmlunit.corejs.javascript.EvaluatorException: Java method "playVideo" was invoked with [object HTMLObjectElement] as "this" value that can not be converted to Java type WMP. at com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter.runtimeError(StrictErrorReporter.java:81) at net.sourceforge.htmlunit.corejs.javascript.Context.reportRuntimeError(Context.java:1029) at net.sourceforge.htmlunit.corejs.javascript.Context.reportRuntimeError(Context.java:1076) ...........[SNIP] ======= EXCEPTION END ======== If I initialize the ActiveXObject as var wmi = new ActiveXObject("WMPlayer.OCX.7"); The above example works flawlessly 2014-01-31 smk smk <ste...@gm...>: > Thanks that was fast!!!! > > I wll update the sources and i 'll let you know. > > > |
From: smk s. <ste...@gm...> - 2014-01-31 11:38:05
|
Thanks that was fast!!!! I wll update the sources and i 'll let you know. |
From: Ahmed A. <asa...@ya...> - 2014-01-31 05:28:39
|
Hi, Fixed in SVN, thanks for reporting. Ahmed ________________________________ From: smk smk <ste...@gm...> To: Ahmed Ashour <asa...@ya...>; htm...@li... Sent: Thursday, January 30, 2014 9:11 PM Subject: Re: [Htmlunit-user] Map <bject> to custom JavaClass First of all thank you for your answer. webClient.setActiveXObjectMap(activeXMap) works and works fine IF the ActiveXObject is created with this declaration in javascript var wmi =newActiveXObject("WMPlayer.OCX.7"); However it doesn't work when it gets created with the object tag e.g <object id="PlayerEx2"classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"height="200"width="200"> |
From: smk s. <ste...@gm...> - 2014-01-30 18:11:52
|
First of all thank you for your answer. webClient.setActiveXObjectMap(activeXMap) works and works fine IF the ActiveXObject is created with this declaration in javascript var wmi = new ActiveXObject("WMPlayer.OCX.7"); However it doesn't work when it gets created with the object tag e.g <object id="PlayerEx2" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="200" width="200"> 2014-01-30 Ahmed Ashour <asa...@ya...>: > HI, > > How about webClient.setActiveXObjectMap() > > Ahmed > > ------------------------------ > *From:* smk smk <ste...@gm...> > *To:* htm...@li... > *Sent:* Thursday, January 30, 2014 1:26 PM > *Subject:* [Htmlunit-user] Map <bject> to custom JavaClass > > The question also posted by me at StackOverflow and is the following: > > I am using HtmlUnit and I am trying to provide custom implementation for > ActiveXObjects. Although I can provide custom implementation when an > ActiveObject is called through javascript by name e.g. > > var wmi = new ActiveXObject("WMPlayer.OCX.7"); > > I cannot do the same when the object is declared with its classid like > > <object id="PlayerEx2" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="200" width="200"> > > I have found these threads > http://comments.gmane.org/gmane.comp.java.htmlunit.general/3894 and > http://sourceforge.net/p/htmlunit/bugs/691/ that describe the same > problem. > Also it appears that it can be done using > > client.setHtmlObjectMap(htmlObjectToJavaMapping); > > however, I am using htmlunit 2.13 and I cannot find this method. > Additionally I know that i could use jacob (java-com bridge) but jacob > communicates with existing/installed com-objects. I wish to provide my own > mock implementations. > I could not find any other information on the subject. Could you please > guide me on how this could be done? > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |
From: Ahmed A. <asa...@ya...> - 2014-01-30 12:11:33
|
HI, How about webClient.setActiveXObjectMap() Ahmed ________________________________ From: smk smk <ste...@gm...> To: htm...@li... Sent: Thursday, January 30, 2014 1:26 PM Subject: [Htmlunit-user] Map <bject> to custom JavaClass The question also posted by me at StackOverflow and is the following: I am using HtmlUnit and I am trying to provide custom implementation for ActiveXObjects. Although I can provide custom implementation when an ActiveObject is called through javascript by name e.g. var wmi =newActiveXObject("WMPlayer.OCX.7"); I cannot do the same when the object is declared with its classid like <object id="PlayerEx2"classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"height="200"width="200"> I have found these threads http://comments.gmane.org/gmane.comp.java.htmlunit.general/3894 andhttp://sourceforge.net/p/htmlunit/bugs/691/ that describe the same problem. Also it appears that it can be done using client.setHtmlObjectMap(htmlObjectToJavaMapping); however, I am using htmlunit 2.13 and I cannot find this method. Additionally I know that i could use jacob (java-com bridge) but jacob communicates with existing/installed com-objects. I wish to provide my own mock implementations. I could not find any other information on the subject. Could you please guide me on how this could be done? ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: David M. G. <mic...@gm...> - 2014-01-30 11:50:46
|
Hi, Thanks for your explanation. I use htmlunit through selenium and now i learned that they initialize it with WaitingRefreshHandler. Thanks, David On Thu, Jan 30, 2014 at 1:38 PM, < htm...@li...> wrote: > Send Htmlunit-user mailing list submissions to > htm...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > or, via email, send a message with subject or body 'help' to > htm...@li... > > You can reach the person managing the list at > htm...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Htmlunit-user digest..." > > > Today's Topics: > > 1. Re: htmlunit sometimes hanging (Marc Guillemot) > 2. Detect event handler? (Jim Xie) > 3. Testing next release (Ahmed Ashour) > 4. Map <bject> to custom JavaClass (smk smk) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 22 Jan 2014 15:37:08 +0100 > From: Marc Guillemot <mgu...@ya...> > Subject: Re: [Htmlunit-user] htmlunit sometimes hanging > To: htm...@li... > Message-ID: <52D...@ya...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi > > look carefully at the stack: it doesn't hang, it is waiting because > you're using the WaitingRefreshHandler. Are you sure that this refresh > handler makes sense for you? According to your question, it is probably > not the case ;-) > > Cheers, > Marc. > -- > HtmlUnit support & consulting from the source > Blog: http://mguillem.wordpress.com > > Le 22/01/2014 13:19, David Michael Gang a ?crit : > > Hi all, > > > > I use htmlunit 2.14 snapshot. > > Sometimes it is hanging and does not return. > > Unfortunately i cannot give a code because i cannot reproduce the > problem. > > I performed jstack on the hanging pid and got (just part of it, it looks > > like a big loop) : > > "main" prio=10 tid=0x000000005608e800 nid=0x453 waiting on condition > > [0x00000000413ff000] > > java.lang.Thread.State: TIMED_WAITING (sleeping) > > at java.lang.Thread.sleep(Native Method) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:74) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > > at > > > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > > .... > > at > > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > > at > > > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > > at > > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > > at > > browser.HtmlUnitDriverExtension.get(HtmlUnitDriverExtension.java:35) > > at > > org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:463) > > > > What can i do to prevent this issue? > > > > Thanks, > > David > > > |
From: smk s. <ste...@gm...> - 2014-01-30 11:38:03
|
The question also posted by me at StackOverflow and is the following: I am using HtmlUnit and I am trying to provide custom implementation for ActiveXObjects. Although I can provide custom implementation when an ActiveObject is called through javascript by name e.g. var wmi = new ActiveXObject("WMPlayer.OCX.7"); I cannot do the same when the object is declared with its classid like <object id="PlayerEx2" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="200" width="200"> I have found these threads http://comments.gmane.org/gmane.comp.java.htmlunit.general/3894 and http://sourceforge.net/p/htmlunit/bugs/691/ that describe the same problem. Also it appears that it can be done using client.setHtmlObjectMap(htmlObjectToJavaMapping); however, I am using htmlunit 2.13 and I cannot find this method. Additionally I know that i could use jacob (java-com bridge) but jacob communicates with existing/installed com-objects. I wish to provide my own mock implementations. I could not find any other information on the subject. Could you please guide me on how this could be done? |
From: Ahmed A. <asa...@ya...> - 2014-01-27 04:44:36
|
Hi all, We have recently upgraded the underlying HttpClient library to 4.3.2, with using a new set of API. As we are releasing soon, the team appreciates your participation by running your tests, in case the HtmlUnit test suite doesn't cover your particular needs. Latest snapshot is updated in Maven snapshot repository, and in the build server [1] Thanks a lot, Ahmed [1] http://build.canoo.com/htmlunit/artifacts/ |
From: Jim X. <jx...@cl...> - 2014-01-23 14:44:41
|
I want to detect all event handlers on some elements using the following code: com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement script = (com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement)(htmlElement).getScriptObject(); ComputedCSSStyleDeclaration style = script.getCurrentStyle(); Function eventHandler = script.getEventHandler("onclick"); System.out.println(eventHandler); Object onclick2 = script.getOnclick(); System.out.println(onclick2); -------------------------------------------------- HtmlElement - htmleElement has a click event handler that is created by a javascript in the end of document </body>. The above code can not detect this click event handler. Thanks in advance. Jim |
From: Marc G. <mgu...@ya...> - 2014-01-22 14:37:17
|
Hi look carefully at the stack: it doesn't hang, it is waiting because you're using the WaitingRefreshHandler. Are you sure that this refresh handler makes sense for you? According to your question, it is probably not the case ;-) Cheers, Marc. -- HtmlUnit support & consulting from the source Blog: http://mguillem.wordpress.com Le 22/01/2014 13:19, David Michael Gang a écrit : > Hi all, > > I use htmlunit 2.14 snapshot. > Sometimes it is hanging and does not return. > Unfortunately i cannot give a code because i cannot reproduce the problem. > I performed jstack on the hanging pid and got (just part of it, it looks > like a big loop) : > "main" prio=10 tid=0x000000005608e800 nid=0x453 waiting on condition > [0x00000000413ff000] > java.lang.Thread.State: TIMED_WAITING (sleeping) > at java.lang.Thread.sleep(Native Method) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:74) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) > at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) > .... > at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) > at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > at > browser.HtmlUnitDriverExtension.get(HtmlUnitDriverExtension.java:35) > at > org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:463) > > What can i do to prevent this issue? > > Thanks, > David > |
From: David M. G. <mic...@gm...> - 2014-01-22 12:19:24
|
Hi all, I use htmlunit 2.14 snapshot. Sometimes it is hanging and does not return. Unfortunately i cannot give a code because i cannot reproduce the problem. I performed jstack on the hanging pid and got (just part of it, it looks like a big loop) : "main" prio=10 tid=0x000000005608e800 nid=0x453 waiting on condition [0x00000000413ff000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:74) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WaitingRefreshHandler.handleRefresh(WaitingRefreshHandler.java:92) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:1425) .... at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:294) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:462) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) at browser.HtmlUnitDriverExtension.get(HtmlUnitDriverExtension.java:35) at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:463) What can i do to prevent this issue? Thanks, David |
From: Ahmed A. <asa...@ya...> - 2014-01-21 10:33:39
|
Hi Charu, The error is "Cannot find function createNode in object [object", which happens when this method is not implemented. Please: - Use latest version (if not SVN one). - Provide complete case, for others to reproduce. - Use FF browser simulation, as it may give the Object type. Ahmed ________________________________ From: Charu Bashiyan <cha...@gm...> To: htm...@li... Sent: Tuesday, January 21, 2014 12:59 PM Subject: [Htmlunit-user] Unable to click on HtmlAnchor Hello, I am trying to click on a link on a website. I am able to isolate the anchor in the variable "selected". But I am unable to click on that anchor. Please advise how to click a anchor and get the resultant page. List anchors = ((HtmlPage)pageAfterLogin).getAnchors(); HtmlAnchor selected = null; for(int i = 0; i < anchors.size(); i++) { System.out.println(anchors.get(i)); if ( anchors.get(i).toString().contains("PasswordLink" )) { selected = (HtmlAnchor)anchors.get(i); } } System.out.println( " selected = " + selected ); Page pageafterclick = selected.click(); // Getting the exception here. System.out.println("--------------------------------------------"); System.out.println(" pageafterclick = "); I am getting a huge Exception , part of that exception pasted below . -------------------------------------- [testng] ======= EXCEPTION START ======== [testng] EcmaError: lineNumber=[64] column=[0] lineSource=[null] name=[TypeError] sourceName=[http://adc21.dummy.com:7036/abc/afr/partition/ie/n/default/opt/core-11.1.1.7.0-3309.js] message=[TypeError: Cannot find function createNode in object [object]. (http://machinename.us.dummy.com:7036/abc/afr/partition/ie/n/default/opt/core-11.1.1.7.0-3309.js#64)] [testng] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function createNode in object [object]. (http://machinename.us.dummy.com:7036/abc/afr/partition/ie/n/default/opt/core-11.1.1.7.0-3309.js#64) [testng] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:526) [testng] at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) [testng] at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) [testng] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456) [testng] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925) [testng] at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182) [testng] at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200) [testng] at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:609) [testng] at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886) [testng] at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) [testng] at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) [testng] at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891) [testng] at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1237) [testng] at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1208) [testng] at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1177) [testng] at dummy.oam.fiat.passwordpolicy.PasswordPolicy.accessResource(PasswordPolicy.java:687) [testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [testng] at java.lang.reflect.Method.invoke(Method.java:597) [testng] at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:76) [testng] at org.testng.internal.Invoker.invokeMethod(Invoker.java:673) . |
From: Charu B. <cha...@gm...> - 2014-01-21 09:59:54
|
Hello, I am trying to click on a link on a website. I am able to isolate the anchor in the variable "selected". But I am unable to click on that anchor. Please advise how to click a anchor and get the resultant page. List anchors = ((HtmlPage)pageAfterLogin).getAnchors(); HtmlAnchor selected = null; for(int i = 0; i < anchors.size(); i++) { System.out.println(anchors.get(i)); if ( anchors.get(i).toString().contains("PasswordLink" )) { selected = (HtmlAnchor)anchors.get(i); } } System.out.println( " selected = " + selected ); *Page pageafterclick = selected.click();* // Getting the exception here. System.out.println("--------------------------------------------"); System.out.println(" *pageafterclick * = "); I am getting a huge Exception , part of that exception pasted below . -------------------------------------- [testng] ======= EXCEPTION START ======== [testng] EcmaError: lineNumber=[64] column=[0] lineSource=[null] name=[TypeError] sourceName=[ http://adc21.dummy.com:7036/abc/afr/partition/ie/n/default/opt/core-11.1.1.7.0-3309.js] message=[TypeError: Cannot find function createNode in object [object]. ( http://machinename.us.dummy.com:7036/abc/afr/partition/ie/n/default/opt/core-11.1.1.7.0-3309.js#64 )] [testng] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function createNode in object [object]. ( http://machinename.us.dummy.com:7036/abc/afr/partition/ie/n/default/opt/core-11.1.1.7.0-3309.js#64 ) [testng] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:526) [testng] at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) [testng] at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) [testng] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456) [testng] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925) [testng] at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182) [testng] at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200) [testng] at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:609) [testng] at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886) [testng] at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529) [testng] at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536) [testng] at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891) [testng] at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1237) [testng] at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1208) [testng] at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1177) [testng] at dummy.oam.fiat.passwordpolicy.PasswordPolicy.accessResource(PasswordPolicy.java:687) [testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [testng] at java.lang.reflect.Method.invoke(Method.java:597) [testng] at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:76) [testng] at org.testng.internal.Invoker.invokeMethod(Invoker.java:673) . . . org.testng.SuiteRunner.run(SuiteRunner.java:223) [testng] at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) [testng] at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) [testng] at org.testng.TestNG.runSuitesSequentially(TestNG.java:1039) [testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:964) [testng] at org.testng.TestNG.run(TestNG.java:900) [testng] at org.testng.TestNG.privateMain(TestNG.java:1182) [testng] at org.testng.TestNG.main(TestNG.java:1146) [testng] Caused by: net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot find function createNode in object [object]. ( http://machinename.us.dummy.com:7036/abc/afr/partition/ie/n/default/opt/core-11.1.1.7.0-3309.js#64 ) [testng] at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3651) ------------------------------- Please advise how to click a anchor and get the resultant page. Thanks. |
From: George D. <li...@iD...> - 2014-01-20 21:02:39
|
Jim, On 1/20/14, 3:51 PM, Jim Xie wrote: > > George, > > Here is what I want to do: > 1. display url in JWebBrowser (JWebBrowser.navigate(url)) > 2. final HtmlPage page = WebClient.getPage(url); > 3. parse HtmlPage to get a list of HtmlElement. > 4. change some style on HtmlElemnt using first email of code. > 5. New change of style should be seen in JWebBrowser. > > At this point, I cannot see new change in JWebBrowser. How would JWebBrowser see changes made in memory by HtmlUnit? They are two separate browsers. -- George > > Jim > > ----- Original Message ----- > From: "George Dinwiddie" <li...@iD...> > To: htm...@li... > Sent: Monday, January 20, 2014 3:13:40 PM > Subject: Re: [Htmlunit-user] How to change a form background color > > Jim, > > On 1/20/14, 2:44 PM, Jim Xie wrote: >> I have the following code that changes a form style >> >> HtmlForm htmlForm = getForm(); //supposed to get a HtmlForm object. >> ScriptableObject scriptObject = htmlForm.getScriptObject(); >> HTMLFormElement formElement = (HTMLFormElement)scriptObject; >> ComputedCSSStyleDeclaration style = formElement.getCurrentStyle(); >> style.setBackgroundColor("#FF0000"); >> style.setBorderColor("blue"); >> >> The above code doesn't work. Please help me out. > > What were you expecting it to do? > > - George > -- ---------------------------------------------------------------------- * George Dinwiddie * http://blog.gdinwiddie.com Software Development http://www.idiacomputing.com Consultant and Coach http://www.agilemaryland.org ---------------------------------------------------------------------- |