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...> - 2015-05-14 17:40:22
|
Hi Teryl, How about webClient.setActiveXObjectMap() See its test case in: http://htmlunit.sourceforge.net/xref-test/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLObjectElementTest.html Yours,Ahmed From: Teryl Taylor <ter...@gm...> To: htm...@li... Sent: Thursday, May 14, 2015 5:32 PM Subject: [Htmlunit-user] HTMLObjectElement Question Hi everyone, Great job with HTMLUnit. Just learning it and it seems like a nice stable piece of software. I have a question about some javascript I'm running in a page. a snippet is as follows: var obj = window.document.createElement("object"); obj.classid = javaClassIds[k]; window.document.body.appendChild(obj); As expected, this code creates an HTMLObjectElement in Java. However, the second line calls the "put" function on HTMLObjectElement rather than setClassid. I'd like to build an Active X object for the classid, and use it to handle the custom attributes, which seems like it would work if setClassid was called in the above scenario. Is this a bug or the intended functionality? Is there any easy way to force setClassid to be called? Best, Teryl |
From: Teryl T. <ter...@gm...> - 2015-05-14 15:32:23
|
Hi everyone, Great job with HTMLUnit. Just learning it and it seems like a nice stable piece of software. I have a question about some javascript I'm running in a page. a snippet is as follows: var obj = window.document.createElement("object"); obj.classid = javaClassIds[k]; window.document.body.appendChild(obj); As expected, this code creates an HTMLObjectElement in Java. However, the second line calls the "put" function on HTMLObjectElement rather than setClassid. I'd like to build an Active X object for the classid, and use it to handle the custom attributes, which seems like it would work if setClassid was called in the above scenario. Is this a bug or the intended functionality? Is there any easy way to force setClassid to be called? Best, Teryl |
From: Ahmed A. <asa...@ya...> - 2015-05-12 07:31:04
|
Hi Charu, I guess you are not using an IDE. The API has changed since 2.6. It is possible that your code still uses incorrect Cookie (htmlunit vs httpclient). Please provide the complete error details, and/or your source files. Ahmed From: Charu Bashiyan <cha...@gm...> To: htm...@li... Sent: Tuesday, May 12, 2015 9:02 AM Subject: [Htmlunit-user] Upgrade from htmlunit 2.6 to 2.16 Hi , I am trying to upgrade from htmlunit 2.6 to 2.16 I have downloaded the jars and run the module . I am getting the below issue - .... [javac] required: org.apache.commons.httpclient.Cookie [javac] found: com.gargoylesoftware.htmlunit.util.Cookie .... Is this expected . Please suggest how can we resolve this. Thanks . |
From: Ahmed A. <asa...@ya...> - 2015-05-12 07:27:17
|
Hi, This seems to be an issue, please open a bug ticket. You can speed help to investigate it, by having a local copy and compare HtmlUnit against real browsers as hinted in http://htmlunit.sourceforge.net/submittingJSBugs.html Ahmed From: UliScherrer <uli...@gm...> To: htm...@li... Sent: Monday, May 11, 2015 5:27 PM Subject: [Htmlunit-user] oracle adf faces - click delivers unexpected page Hi, there is a website like this <form id="f1" name="f1" class="af_form" enctype="multipart/form-data" method="POST" action="/webcenter/faces/oracle/webcenter/page/scopedMD/s17f3c4ff_32e3_4ca9_933f_f6142f999d92/Page229.jspx?wc.contextURL=/spaces/gkpExternal&_adf.ctrl-state=10ok9yle5b_4"> ......... <div id="T:pt_pl2" class="navigation-top content-style navigation-level-1 af_panelList initialized-scroll"> <ul> <li value="2" style="display: none;"> Produkte <#> When I click on the anchor "Produkte" I get just the same page, only class of this anchor changed to class="p_AFDisabled p_AFBusy nav-text nav-children" The wanted page does not load. Do I miss something with Cookies or Session? final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_31); webClient.getOptions().setThrowExceptionOnScriptError(false); String website = "https://www.dhl-geschaeftskundenportal.de"; URL url = new URL(website); HtmlPage startPage = (HtmlPage)webClient.getPage(url); String htmlId = "T:sf_topj_id_1:cmds_top_x"; //anchor "Produkte" HtmlAnchor anchor = (HtmlAnchor)startPage.getElementById(htmlId); HtmlPage productPage = anchor.click(); //sorry, no productPage; startPage loaded Uli |
From: Charu B. <cha...@gm...> - 2015-05-12 07:02:54
|
Hi , I am trying to upgrade from htmlunit 2.6 to 2.16 I have downloaded the jars and run the module . I am getting the below issue - .... [javac] required: org.apache.commons.httpclient.Cookie [javac] found: com.gargoylesoftware.htmlunit.util.Cookie .... Is this expected . Please suggest how can we resolve this. Thanks . |
From: UliScherrer <uli...@gm...> - 2015-05-11 15:45:31
|
Hi, there is a website like this <form id="f1" name="f1" class="af_form" enctype="multipart/form-data" method="POST" action="/webcenter/faces/oracle/webcenter/page/scopedMD/s17f3c4ff_32e3_4ca9_933f_f6142f999d92/Page229.jspx?wc.contextURL=/spaces/gkpExternal&_adf.ctrl-state=10ok9yle5b_4"> ......... <div id="T:pt_pl2" class="navigation-top content-style navigation-level-1 af_panelList initialized-scroll"> <ul> <li value="2" style="display: none;"> Produkte <#> When I click on the anchor "Produkte" I get just the same page, only class of this anchor changed to class="p_AFDisabled p_AFBusy nav-text nav-children" The wanted page does not load. Do I miss something with Cookies or Session? final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_31); webClient.getOptions().setThrowExceptionOnScriptError(false); String website = "https://www.dhl-geschaeftskundenportal.de"; URL url = new URL(website); HtmlPage startPage = (HtmlPage)webClient.getPage(url); String htmlId = "T:sf_topj_id_1:cmds_top_x"; //anchor "Produkte" HtmlAnchor anchor = (HtmlAnchor)startPage.getElementById(htmlId); HtmlPage productPage = anchor.click(); //sorry, no productPage; startPage loaded Uli -- View this message in context: http://htmlunit.10904.n7.nabble.com/oracle-adf-faces-click-delivers-unexpected-page-tp36032.html Sent from the HtmlUnit - General mailing list archive at Nabble.com. |
From: Ahmed A. <asa...@ya...> - 2015-04-30 05:49:57
|
Hi Dan, SgmlPage is part of the htmlunit jar, and it is a must to be loaded. You may have duplicate htmlunit jars (of old and new version), you can see the jar location by something like: System.out.println(WebClient.class.getProtectionDomain().getCodeSource().getLocation()); Also, you can download OSGi jar which combines all dependencies from [1] If you still have an issue, please post your project structure, with the line command if you are not using eclipse/maven. Yours,Ahmed [1] https://sourceforge.net/projects/htmlunit/files/htmlunit/2.16/ From: mendels <men...@gm...> To: htm...@li... Sent: Wednesday, April 29, 2015 10:12 PM Subject: [Htmlunit-user] Runtime problem with latest version of Htmlunit I am finally getting around to upgrading my version of Htmlunit (2.8 > 2.16) and am getting an error for a class that I don't even use. This seems to happen with all newer versions, even when I copy 2.9 into my current environment. Am I missing some file? I have all the jars that are included with the package. Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/gargoylesoftware/htmlunit/SgmlPage It also gives an error for com.gargoylesoftware.htmlunit.ElementNotFoundException as well. Any ideas that might help debug this? Dan |
From: mendels <men...@gm...> - 2015-04-29 20:12:28
|
I am finally getting around to upgrading my version of Htmlunit (2.8 > 2.16) and am getting an error for a class that I don't even use. This seems to happen with all newer versions, even when I copy 2.9 into my current environment. Am I missing some file? I have all the jars that are included with the package. Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/gargoylesoftware/htmlunit/SgmlPage It also gives an error for com.gargoylesoftware.htmlunit.ElementNotFoundException as well. Any ideas that might help debug this? Dan |
From: Ahmed A. <asa...@ya...> - 2015-04-23 16:29:19
|
Hi Alamgir, I guess it is better to fix HtmlUnit, than to change your code. Please isolate a minimal test case which shows the loading order. Ahmed From: Alamgir Farouk <afa...@ho...> To: "htm...@li..." <htm...@li...> Sent: Thursday, April 23, 2015 6:16 PM Subject: Re: [Htmlunit-user] executing javascript which itself is dynamically loaded #yiv1561717856 #yiv1561717856 --.yiv1561717856hmmessage P{margin:0px;padding:0px;}#yiv1561717856 body.yiv1561717856hmmessage{font-size:12pt;font-family:Calibri;}#yiv1561717856 So, here is the conclusion so far: HtmlUnit javascript executor is aborting execution claiming we have a bug in our javascript in that we are calling an undefined function initializePage. However, this bug, in turn, is happening because our javascript is not being loaded properly or in the right order by htmlunit. There is obviously a difference between browser js support and htmlunit (not surprising, of course). We use require.js, and function.prototype.bind we are trying to build a version without require.js, -but it would help if we could understand what htmlunit supports and does not support so that we can modify our code. From: afa...@ho... To: htm...@li... Date: Thu, 23 Apr 2015 15:39:33 +0000 Subject: Re: [Htmlunit-user] executing javascript which itself is dynamically loaded #yiv1561717856 #yiv1561717856 --.yiv1561717856ExternalClass .yiv1561717856ecxhmmessage P {padding:0px;}#yiv1561717856 .yiv1561717856ExternalClass body.yiv1561717856ecxhmmessage {font-size:12pt;font-family:Calibri;}#yiv1561717856 thanks again. Yes, it seems that that one function, initializePage not being executed is the problem. Or rather why it is not being found. So our html does not get built. I am trying with an uncompressed build, to see if I can track it down. The browsers obviously find and execute this function. > Date: Thu, 23 Apr 2015 14:20:39 +0200 > From: mgu...@ya... > To: htm...@li... > Subject: Re: [Htmlunit-user] executing javascript which itself is dynamically loaded > > Hi, > > you should try following with latest release (or latest sources from SVN): > ---------------- > final WebClient webClient = new WebClient( > BrowserVersion.FIREFOX_31); > webClient.getOptions().setUseInsecureSSL(true); > > HtmlPage page = webClient > > .getPage("https://appointment-service.com/#cmt2_lefoodtruck"); > webClient.waitForBackgroundJavaScript(10000); > webClient.waitForBackgroundJavaScriptStartingBefore(10000); > System.out.println(page.asXml()); > webClient.close(); > ---------------- > > It seems not to produce errors (the only one in your log was >TypeError: > Cannot find function initializePage in object [object Object].<, the > rest is only informative) > > Cheers, > Marc. > -- > HtmlUnit support & consulting from the source > Blog: http://mguillem.wordpress.com > > Le 22/04/2015 18:02, Alamgir Farouk a écrit : > > Thank you for your reply. I changed the 'wait' to after the call. I can > > see that some of the javascript is executed as the 'title' element > > changes to "Le Food Truck" However, we seem to be hitting errors and I > > could not debug. > > > > Our site is optimized for fast loading on a phone, so we have our > > initial javascript run and load more javascript css. Basically, the page > > loads from https://appointment-service.com and the javascript downloads > > the rest of the data via REST api calls to https://communitylive.ws . > > Pretty standard stuff. > > > > The farthest I could go was with the following configuration. > > ------------------- > > final WebClient webClient = new WebClient( > > BrowserVersion.FIREFOX_31); > > > > webClient > > .setAjaxController(new > > NicelyResynchronizingAjaxController()); > > webClient.getOptions().setCssEnabled(false); > > > > webClient.getOptions().setThrowExceptionOnFailingStatusCode(true); > > webClient.getOptions().setThrowExceptionOnScriptError(true); > > webClient.getOptions().setRedirectEnabled(false); > > webClient.getOptions().setAppletEnabled(false); > > webClient.getOptions().setJavaScriptEnabled(true); > > webClient.getOptions().setPopupBlockerEnabled(true); > > webClient.getOptions().setPrintContentOnFailingStatusCode(true); > > webClient.getOptions().setUseInsecureSSL(true); > > > > HtmlPage page = webClient > > > > .getPage("https://appointment-service.com/#cmt2_lefoodtruck"); > > webClient.waitForBackgroundJavaScript(10000); > > webClient.waitForBackgroundJavaScriptStartingBefore(10000); > > // just wait > > try { > > for (int i = 0; i < 20; i++) { > > synchronized (page) { > > page.wait(100); > > } > > } > > } catch (Throwable e) { > > e.printStackTrace(); > > } > > System.out.println(page.asXml()); > > webClient.close(); > > ---------------- > > > > Now I get errors like javascript function initializePage() not found > > along with a few other errors. (below). We can reorder the loading of > > scripts and have an un-optimized version if necessary, only for creating > > snapshots. But we are still not being able to get the whole page to work. > > > > Thanks, -Alamgir > > > > ---------- errors --------- > > 08:54:54,677 WARN IncorrectnessListenerImpl:38 – Obsolete content type > > encountered: 'text/javascript'. > > 08:54:56,166 ERROR StrictErrorReporter:80 – runtimeError: message=[An > > invalid or illegal selector was specified (selector: '*,:x' error: > > Invalid selector: *:x).] > > sourceName=[https://appointment-service.com/scripts/main.0280c46b5c658e80.js] > > line=[1] lineSource=[null] lineOffset=[0] > > 08:54:56,404 WARN HtmlScript:468 – Script is not JavaScript (type: > > text/vbscript, language: ). Skipping execution. > > 08:54:57,606 ERROR JavaScriptJobManagerImpl:418 – Job run failed with > > unexpected RuntimeException: TypeError: Cannot find function > > initializePage in object [object Object]. > > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1) > > ======= EXCEPTION START ======== > > EcmaError: lineNumber=[1] column=[0] lineSource=[ function (e, i) {] > > name=[TypeError] > > sourceName=[https://appointment-service.com/scripts/main.0280c46b5c658e80.js] > > message=[TypeError: Cannot find function initializePage in object > > [object Object]. > > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1)] > > com.gargoylesoftware.htmlunit.ScriptException: TypeError: *Cannot find > > function initializePage in object [object Object].* > > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1) > > > > > > > >> Date: Wed, 22 Apr 2015 15:04:54 +0200 > >> From: mgu...@ya... > >> To: htm...@li... > >> Subject: Re: [Htmlunit-user] executing javascript which itself is > > dynamically loaded > >> > >> Hi, > >> > >> your code doesn't let HtmlUnit time to do anything with the page as you > >> close it too early. I would rather try: > >> > >> final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_31); > >> HtmlPage page = > >> webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); > >> > >> webClient.waitForBackgroundJavaScript(40000); > >> // or Thread.sleep(10000); // in case the problem comes from > >> waitForBackgroundJavaScript > >> System.out.println(page.asXml()); > >> webClient.close(); > >> > >> > >> Cheers, > >> Marc. > >> -- > >> HtmlUnit support & consulting from the source > >> Blog: http://mguillem.wordpress.com > >> > >> Le 21/04/2015 12:29, Alamgir Farouk a écrit : > >> > our site (test) is > >> > http://appointment-service.com/cmt2_lefoodtruck > >> > (ignore the names, they have no meaning) > >> > > >> > In order to optimize loading on a mobile phone, we download the bulk of > >> > they javascript and css dynamically, via a small javascript function. I > >> > am not sure if this is the problem or something else is wrong, but when > >> > I try to load this site using HtmlUnit, it appears that the javascript > >> > is not being executed. > >> > (java excerpt) > >> > final WebClient webClient = new > >> > WebClient(BrowserVersion.INTERNET_EXPLORER_11); > >> > webClient.waitForBackgroundJavaScript(40000); > >> > HtmlPage page = > >> > webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); > >> > System.out.println(page.asXml()); > >> > webClient.close(); > >> > > >> > What are our options? We are trying to create html snapshots for Google > >> > indexing. > >> > > >> > Thanks > >> > >> > >> > >> > > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user ------------------------------------------------------------------------------BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDTDevelop your own process in accordance with the BPMN 2 standardLearn Process modeling best practices with Bonita BPM through live exerciseshttp://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________Htmlunit-user mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/htmlunit-user ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Alamgir F. <afa...@ho...> - 2015-04-23 16:16:57
|
So, here is the conclusion so far: HtmlUnit javascript executor is aborting execution claiming we have a bug in our javascript in that we are calling an undefined function initializePage. However, this bug, in turn, is happening because our javascript is not being loaded properly or in the right order by htmlunit. There is obviously a difference between browser js support and htmlunit (not surprising, of course). We use require.js, and function.prototype.bind we are trying to build a version without require.js, -but it would help if we could understand what htmlunit supports and does not support so that we can modify our code. From: afa...@ho... To: htm...@li... Date: Thu, 23 Apr 2015 15:39:33 +0000 Subject: Re: [Htmlunit-user] executing javascript which itself is dynamically loaded thanks again. Yes, it seems that that one function, initializePage not being executed is the problem. Or rather why it is not being found. So our html does not get built. I am trying with an uncompressed build, to see if I can track it down. The browsers obviously find and execute this function. > Date: Thu, 23 Apr 2015 14:20:39 +0200 > From: mgu...@ya... > To: htm...@li... > Subject: Re: [Htmlunit-user] executing javascript which itself is dynamically loaded > > Hi, > > you should try following with latest release (or latest sources from SVN): > ---------------- > final WebClient webClient = new WebClient( > BrowserVersion.FIREFOX_31); > webClient.getOptions().setUseInsecureSSL(true); > > HtmlPage page = webClient > > .getPage("https://appointment-service.com/#cmt2_lefoodtruck"); > webClient.waitForBackgroundJavaScript(10000); > webClient.waitForBackgroundJavaScriptStartingBefore(10000); > System.out.println(page.asXml()); > webClient.close(); > ---------------- > > It seems not to produce errors (the only one in your log was >TypeError: > Cannot find function initializePage in object [object Object].<, the > rest is only informative) > > Cheers, > Marc. > -- > HtmlUnit support & consulting from the source > Blog: http://mguillem.wordpress.com > > Le 22/04/2015 18:02, Alamgir Farouk a écrit : > > Thank you for your reply. I changed the 'wait' to after the call. I can > > see that some of the javascript is executed as the 'title' element > > changes to "Le Food Truck" However, we seem to be hitting errors and I > > could not debug. > > > > Our site is optimized for fast loading on a phone, so we have our > > initial javascript run and load more javascript css. Basically, the page > > loads from https://appointment-service.com and the javascript downloads > > the rest of the data via REST api calls to https://communitylive.ws . > > Pretty standard stuff. > > > > The farthest I could go was with the following configuration. > > ------------------- > > final WebClient webClient = new WebClient( > > BrowserVersion.FIREFOX_31); > > > > webClient > > .setAjaxController(new > > NicelyResynchronizingAjaxController()); > > webClient.getOptions().setCssEnabled(false); > > > > webClient.getOptions().setThrowExceptionOnFailingStatusCode(true); > > webClient.getOptions().setThrowExceptionOnScriptError(true); > > webClient.getOptions().setRedirectEnabled(false); > > webClient.getOptions().setAppletEnabled(false); > > webClient.getOptions().setJavaScriptEnabled(true); > > webClient.getOptions().setPopupBlockerEnabled(true); > > webClient.getOptions().setPrintContentOnFailingStatusCode(true); > > webClient.getOptions().setUseInsecureSSL(true); > > > > HtmlPage page = webClient > > > > .getPage("https://appointment-service.com/#cmt2_lefoodtruck"); > > webClient.waitForBackgroundJavaScript(10000); > > webClient.waitForBackgroundJavaScriptStartingBefore(10000); > > // just wait > > try { > > for (int i = 0; i < 20; i++) { > > synchronized (page) { > > page.wait(100); > > } > > } > > } catch (Throwable e) { > > e.printStackTrace(); > > } > > System.out.println(page.asXml()); > > webClient.close(); > > ---------------- > > > > Now I get errors like javascript function initializePage() not found > > along with a few other errors. (below). We can reorder the loading of > > scripts and have an un-optimized version if necessary, only for creating > > snapshots. But we are still not being able to get the whole page to work. > > > > Thanks, -Alamgir > > > > ---------- errors --------- > > 08:54:54,677 WARN IncorrectnessListenerImpl:38 – Obsolete content type > > encountered: 'text/javascript'. > > 08:54:56,166 ERROR StrictErrorReporter:80 – runtimeError: message=[An > > invalid or illegal selector was specified (selector: '*,:x' error: > > Invalid selector: *:x).] > > sourceName=[https://appointment-service.com/scripts/main.0280c46b5c658e80.js] > > line=[1] lineSource=[null] lineOffset=[0] > > 08:54:56,404 WARN HtmlScript:468 – Script is not JavaScript (type: > > text/vbscript, language: ). Skipping execution. > > 08:54:57,606 ERROR JavaScriptJobManagerImpl:418 – Job run failed with > > unexpected RuntimeException: TypeError: Cannot find function > > initializePage in object [object Object]. > > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1) > > ======= EXCEPTION START ======== > > EcmaError: lineNumber=[1] column=[0] lineSource=[ function (e, i) {] > > name=[TypeError] > > sourceName=[https://appointment-service.com/scripts/main.0280c46b5c658e80.js] > > message=[TypeError: Cannot find function initializePage in object > > [object Object]. > > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1)] > > com.gargoylesoftware.htmlunit.ScriptException: TypeError: *Cannot find > > function initializePage in object [object Object].* > > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1) > > > > > > > >> Date: Wed, 22 Apr 2015 15:04:54 +0200 > >> From: mgu...@ya... > >> To: htm...@li... > >> Subject: Re: [Htmlunit-user] executing javascript which itself is > > dynamically loaded > >> > >> Hi, > >> > >> your code doesn't let HtmlUnit time to do anything with the page as you > >> close it too early. I would rather try: > >> > >> final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_31); > >> HtmlPage page = > >> webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); > >> > >> webClient.waitForBackgroundJavaScript(40000); > >> // or Thread.sleep(10000); // in case the problem comes from > >> waitForBackgroundJavaScript > >> System.out.println(page.asXml()); > >> webClient.close(); > >> > >> > >> Cheers, > >> Marc. > >> -- > >> HtmlUnit support & consulting from the source > >> Blog: http://mguillem.wordpress.com > >> > >> Le 21/04/2015 12:29, Alamgir Farouk a écrit : > >> > our site (test) is > >> > http://appointment-service.com/cmt2_lefoodtruck > >> > (ignore the names, they have no meaning) > >> > > >> > In order to optimize loading on a mobile phone, we download the bulk of > >> > they javascript and css dynamically, via a small javascript function. I > >> > am not sure if this is the problem or something else is wrong, but when > >> > I try to load this site using HtmlUnit, it appears that the javascript > >> > is not being executed. > >> > (java excerpt) > >> > final WebClient webClient = new > >> > WebClient(BrowserVersion.INTERNET_EXPLORER_11); > >> > webClient.waitForBackgroundJavaScript(40000); > >> > HtmlPage page = > >> > webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); > >> > System.out.println(page.asXml()); > >> > webClient.close(); > >> > > >> > What are our options? We are trying to create html snapshots for Google > >> > indexing. > >> > > >> > Thanks > >> > >> > >> > >> > > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Alamgir F. <afa...@ho...> - 2015-04-23 15:39:45
|
thanks again. Yes, it seems that that one function, initializePage not being executed is the problem. Or rather why it is not being found. So our html does not get built. I am trying with an uncompressed build, to see if I can track it down. The browsers obviously find and execute this function. > Date: Thu, 23 Apr 2015 14:20:39 +0200 > From: mgu...@ya... > To: htm...@li... > Subject: Re: [Htmlunit-user] executing javascript which itself is dynamically loaded > > Hi, > > you should try following with latest release (or latest sources from SVN): > ---------------- > final WebClient webClient = new WebClient( > BrowserVersion.FIREFOX_31); > webClient.getOptions().setUseInsecureSSL(true); > > HtmlPage page = webClient > > .getPage("https://appointment-service.com/#cmt2_lefoodtruck"); > webClient.waitForBackgroundJavaScript(10000); > webClient.waitForBackgroundJavaScriptStartingBefore(10000); > System.out.println(page.asXml()); > webClient.close(); > ---------------- > > It seems not to produce errors (the only one in your log was >TypeError: > Cannot find function initializePage in object [object Object].<, the > rest is only informative) > > Cheers, > Marc. > -- > HtmlUnit support & consulting from the source > Blog: http://mguillem.wordpress.com > > Le 22/04/2015 18:02, Alamgir Farouk a écrit : > > Thank you for your reply. I changed the 'wait' to after the call. I can > > see that some of the javascript is executed as the 'title' element > > changes to "Le Food Truck" However, we seem to be hitting errors and I > > could not debug. > > > > Our site is optimized for fast loading on a phone, so we have our > > initial javascript run and load more javascript css. Basically, the page > > loads from https://appointment-service.com and the javascript downloads > > the rest of the data via REST api calls to https://communitylive.ws . > > Pretty standard stuff. > > > > The farthest I could go was with the following configuration. > > ------------------- > > final WebClient webClient = new WebClient( > > BrowserVersion.FIREFOX_31); > > > > webClient > > .setAjaxController(new > > NicelyResynchronizingAjaxController()); > > webClient.getOptions().setCssEnabled(false); > > > > webClient.getOptions().setThrowExceptionOnFailingStatusCode(true); > > webClient.getOptions().setThrowExceptionOnScriptError(true); > > webClient.getOptions().setRedirectEnabled(false); > > webClient.getOptions().setAppletEnabled(false); > > webClient.getOptions().setJavaScriptEnabled(true); > > webClient.getOptions().setPopupBlockerEnabled(true); > > webClient.getOptions().setPrintContentOnFailingStatusCode(true); > > webClient.getOptions().setUseInsecureSSL(true); > > > > HtmlPage page = webClient > > > > .getPage("https://appointment-service.com/#cmt2_lefoodtruck"); > > webClient.waitForBackgroundJavaScript(10000); > > webClient.waitForBackgroundJavaScriptStartingBefore(10000); > > // just wait > > try { > > for (int i = 0; i < 20; i++) { > > synchronized (page) { > > page.wait(100); > > } > > } > > } catch (Throwable e) { > > e.printStackTrace(); > > } > > System.out.println(page.asXml()); > > webClient.close(); > > ---------------- > > > > Now I get errors like javascript function initializePage() not found > > along with a few other errors. (below). We can reorder the loading of > > scripts and have an un-optimized version if necessary, only for creating > > snapshots. But we are still not being able to get the whole page to work. > > > > Thanks, -Alamgir > > > > ---------- errors --------- > > 08:54:54,677 WARN IncorrectnessListenerImpl:38 – Obsolete content type > > encountered: 'text/javascript'. > > 08:54:56,166 ERROR StrictErrorReporter:80 – runtimeError: message=[An > > invalid or illegal selector was specified (selector: '*,:x' error: > > Invalid selector: *:x).] > > sourceName=[https://appointment-service.com/scripts/main.0280c46b5c658e80.js] > > line=[1] lineSource=[null] lineOffset=[0] > > 08:54:56,404 WARN HtmlScript:468 – Script is not JavaScript (type: > > text/vbscript, language: ). Skipping execution. > > 08:54:57,606 ERROR JavaScriptJobManagerImpl:418 – Job run failed with > > unexpected RuntimeException: TypeError: Cannot find function > > initializePage in object [object Object]. > > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1) > > ======= EXCEPTION START ======== > > EcmaError: lineNumber=[1] column=[0] lineSource=[ function (e, i) {] > > name=[TypeError] > > sourceName=[https://appointment-service.com/scripts/main.0280c46b5c658e80.js] > > message=[TypeError: Cannot find function initializePage in object > > [object Object]. > > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1)] > > com.gargoylesoftware.htmlunit.ScriptException: TypeError: *Cannot find > > function initializePage in object [object Object].* > > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1) > > > > > > > >> Date: Wed, 22 Apr 2015 15:04:54 +0200 > >> From: mgu...@ya... > >> To: htm...@li... > >> Subject: Re: [Htmlunit-user] executing javascript which itself is > > dynamically loaded > >> > >> Hi, > >> > >> your code doesn't let HtmlUnit time to do anything with the page as you > >> close it too early. I would rather try: > >> > >> final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_31); > >> HtmlPage page = > >> webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); > >> > >> webClient.waitForBackgroundJavaScript(40000); > >> // or Thread.sleep(10000); // in case the problem comes from > >> waitForBackgroundJavaScript > >> System.out.println(page.asXml()); > >> webClient.close(); > >> > >> > >> Cheers, > >> Marc. > >> -- > >> HtmlUnit support & consulting from the source > >> Blog: http://mguillem.wordpress.com > >> > >> Le 21/04/2015 12:29, Alamgir Farouk a écrit : > >> > our site (test) is > >> > http://appointment-service.com/cmt2_lefoodtruck > >> > (ignore the names, they have no meaning) > >> > > >> > In order to optimize loading on a mobile phone, we download the bulk of > >> > they javascript and css dynamically, via a small javascript function. I > >> > am not sure if this is the problem or something else is wrong, but when > >> > I try to load this site using HtmlUnit, it appears that the javascript > >> > is not being executed. > >> > (java excerpt) > >> > final WebClient webClient = new > >> > WebClient(BrowserVersion.INTERNET_EXPLORER_11); > >> > webClient.waitForBackgroundJavaScript(40000); > >> > HtmlPage page = > >> > webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); > >> > System.out.println(page.asXml()); > >> > webClient.close(); > >> > > >> > What are our options? We are trying to create html snapshots for Google > >> > indexing. > >> > > >> > Thanks > >> > >> > >> > >> > > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Marc G. <mgu...@ya...> - 2015-04-23 12:20:49
|
Hi, you should try following with latest release (or latest sources from SVN): ---------------- final WebClient webClient = new WebClient( BrowserVersion.FIREFOX_31); webClient.getOptions().setUseInsecureSSL(true); HtmlPage page = webClient .getPage("https://appointment-service.com/#cmt2_lefoodtruck"); webClient.waitForBackgroundJavaScript(10000); webClient.waitForBackgroundJavaScriptStartingBefore(10000); System.out.println(page.asXml()); webClient.close(); ---------------- It seems not to produce errors (the only one in your log was >TypeError: Cannot find function initializePage in object [object Object].<, the rest is only informative) Cheers, Marc. -- HtmlUnit support & consulting from the source Blog: http://mguillem.wordpress.com Le 22/04/2015 18:02, Alamgir Farouk a écrit : > Thank you for your reply. I changed the 'wait' to after the call. I can > see that some of the javascript is executed as the 'title' element > changes to "Le Food Truck" However, we seem to be hitting errors and I > could not debug. > > Our site is optimized for fast loading on a phone, so we have our > initial javascript run and load more javascript css. Basically, the page > loads from https://appointment-service.com and the javascript downloads > the rest of the data via REST api calls to https://communitylive.ws . > Pretty standard stuff. > > The farthest I could go was with the following configuration. > ------------------- > final WebClient webClient = new WebClient( > BrowserVersion.FIREFOX_31); > > webClient > .setAjaxController(new > NicelyResynchronizingAjaxController()); > webClient.getOptions().setCssEnabled(false); > > webClient.getOptions().setThrowExceptionOnFailingStatusCode(true); > webClient.getOptions().setThrowExceptionOnScriptError(true); > webClient.getOptions().setRedirectEnabled(false); > webClient.getOptions().setAppletEnabled(false); > webClient.getOptions().setJavaScriptEnabled(true); > webClient.getOptions().setPopupBlockerEnabled(true); > webClient.getOptions().setPrintContentOnFailingStatusCode(true); > webClient.getOptions().setUseInsecureSSL(true); > > HtmlPage page = webClient > > .getPage("https://appointment-service.com/#cmt2_lefoodtruck"); > webClient.waitForBackgroundJavaScript(10000); > webClient.waitForBackgroundJavaScriptStartingBefore(10000); > // just wait > try { > for (int i = 0; i < 20; i++) { > synchronized (page) { > page.wait(100); > } > } > } catch (Throwable e) { > e.printStackTrace(); > } > System.out.println(page.asXml()); > webClient.close(); > ---------------- > > Now I get errors like javascript function initializePage() not found > along with a few other errors. (below). We can reorder the loading of > scripts and have an un-optimized version if necessary, only for creating > snapshots. But we are still not being able to get the whole page to work. > > Thanks, -Alamgir > > ---------- errors --------- > 08:54:54,677 WARN IncorrectnessListenerImpl:38 – Obsolete content type > encountered: 'text/javascript'. > 08:54:56,166 ERROR StrictErrorReporter:80 – runtimeError: message=[An > invalid or illegal selector was specified (selector: '*,:x' error: > Invalid selector: *:x).] > sourceName=[https://appointment-service.com/scripts/main.0280c46b5c658e80.js] > line=[1] lineSource=[null] lineOffset=[0] > 08:54:56,404 WARN HtmlScript:468 – Script is not JavaScript (type: > text/vbscript, language: ). Skipping execution. > 08:54:57,606 ERROR JavaScriptJobManagerImpl:418 – Job run failed with > unexpected RuntimeException: TypeError: Cannot find function > initializePage in object [object Object]. > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1) > ======= EXCEPTION START ======== > EcmaError: lineNumber=[1] column=[0] lineSource=[ function (e, i) {] > name=[TypeError] > sourceName=[https://appointment-service.com/scripts/main.0280c46b5c658e80.js] > message=[TypeError: Cannot find function initializePage in object > [object Object]. > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1)] > com.gargoylesoftware.htmlunit.ScriptException: TypeError: *Cannot find > function initializePage in object [object Object].* > (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1) > > > >> Date: Wed, 22 Apr 2015 15:04:54 +0200 >> From: mgu...@ya... >> To: htm...@li... >> Subject: Re: [Htmlunit-user] executing javascript which itself is > dynamically loaded >> >> Hi, >> >> your code doesn't let HtmlUnit time to do anything with the page as you >> close it too early. I would rather try: >> >> final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_31); >> HtmlPage page = >> webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); >> >> webClient.waitForBackgroundJavaScript(40000); >> // or Thread.sleep(10000); // in case the problem comes from >> waitForBackgroundJavaScript >> System.out.println(page.asXml()); >> webClient.close(); >> >> >> Cheers, >> Marc. >> -- >> HtmlUnit support & consulting from the source >> Blog: http://mguillem.wordpress.com >> >> Le 21/04/2015 12:29, Alamgir Farouk a écrit : >> > our site (test) is >> > http://appointment-service.com/cmt2_lefoodtruck >> > (ignore the names, they have no meaning) >> > >> > In order to optimize loading on a mobile phone, we download the bulk of >> > they javascript and css dynamically, via a small javascript function. I >> > am not sure if this is the problem or something else is wrong, but when >> > I try to load this site using HtmlUnit, it appears that the javascript >> > is not being executed. >> > (java excerpt) >> > final WebClient webClient = new >> > WebClient(BrowserVersion.INTERNET_EXPLORER_11); >> > webClient.waitForBackgroundJavaScript(40000); >> > HtmlPage page = >> > webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); >> > System.out.println(page.asXml()); >> > webClient.close(); >> > >> > What are our options? We are trying to create html snapshots for Google >> > indexing. >> > >> > Thanks >> >> >> >> |
From: Alamgir F. <afa...@ho...> - 2015-04-22 16:02:57
|
Thank you for your reply. I changed the 'wait' to after the call. I can see that some of the javascript is executed as the 'title' element changes to "Le Food Truck" However, we seem to be hitting errors and I could not debug. Our site is optimized for fast loading on a phone, so we have our initial javascript run and load more javascript css. Basically, the page loads from https://appointment-service.com and the javascript downloads the rest of the data via REST api calls to https://communitylive.ws . Pretty standard stuff. The farthest I could go was with the following configuration. ------------------- final WebClient webClient = new WebClient( BrowserVersion.FIREFOX_31); webClient .setAjaxController(new NicelyResynchronizingAjaxController()); webClient.getOptions().setCssEnabled(false); webClient.getOptions().setThrowExceptionOnFailingStatusCode(true); webClient.getOptions().setThrowExceptionOnScriptError(true); webClient.getOptions().setRedirectEnabled(false); webClient.getOptions().setAppletEnabled(false); webClient.getOptions().setJavaScriptEnabled(true); webClient.getOptions().setPopupBlockerEnabled(true); webClient.getOptions().setPrintContentOnFailingStatusCode(true); webClient.getOptions().setUseInsecureSSL(true); HtmlPage page = webClient .getPage("https://appointment-service.com/#cmt2_lefoodtruck"); webClient.waitForBackgroundJavaScript(10000); webClient.waitForBackgroundJavaScriptStartingBefore(10000); // just wait try { for (int i = 0; i < 20; i++) { synchronized (page) { page.wait(100); } } } catch (Throwable e) { e.printStackTrace(); } System.out.println(page.asXml()); webClient.close(); ---------------- Now I get errors like javascript function initializePage() not found along with a few other errors. (below). We can reorder the loading of scripts and have an un-optimized version if necessary, only for creating snapshots. But we are still not being able to get the whole page to work. Thanks, -Alamgir ---------- errors --------- 08:54:54,677 WARN IncorrectnessListenerImpl:38 – Obsolete content type encountered: 'text/javascript'. 08:54:56,166 ERROR StrictErrorReporter:80 – runtimeError: message=[An invalid or illegal selector was specified (selector: '*,:x' error: Invalid selector: *:x).] sourceName=[https://appointment-service.com/scripts/main.0280c46b5c658e80.js] line=[1] lineSource=[null] lineOffset=[0] 08:54:56,404 WARN HtmlScript:468 – Script is not JavaScript (type: text/vbscript, language: ). Skipping execution. 08:54:57,606 ERROR JavaScriptJobManagerImpl:418 – Job run failed with unexpected RuntimeException: TypeError: Cannot find function initializePage in object [object Object]. (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1) ======= EXCEPTION START ======== EcmaError: lineNumber=[1] column=[0] lineSource=[ function (e, i) {] name=[TypeError] sourceName=[https://appointment-service.com/scripts/main.0280c46b5c658e80.js] message=[TypeError: Cannot find function initializePage in object [object Object]. (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1)] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function initializePage in object [object Object]. (https://appointment-service.com/scripts/main.0280c46b5c658e80.js#1) > Date: Wed, 22 Apr 2015 15:04:54 +0200 > From: mgu...@ya... > To: htm...@li... > Subject: Re: [Htmlunit-user] executing javascript which itself is dynamically loaded > > Hi, > > your code doesn't let HtmlUnit time to do anything with the page as you > close it too early. I would rather try: > > final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_31); > HtmlPage page = > webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); > > webClient.waitForBackgroundJavaScript(40000); > // or Thread.sleep(10000); // in case the problem comes from > waitForBackgroundJavaScript > System.out.println(page.asXml()); > webClient.close(); > > > Cheers, > Marc. > -- > HtmlUnit support & consulting from the source > Blog: http://mguillem.wordpress.com > > Le 21/04/2015 12:29, Alamgir Farouk a écrit : > > our site (test) is > > http://appointment-service.com/cmt2_lefoodtruck > > (ignore the names, they have no meaning) > > > > In order to optimize loading on a mobile phone, we download the bulk of > > they javascript and css dynamically, via a small javascript function. I > > am not sure if this is the problem or something else is wrong, but when > > I try to load this site using HtmlUnit, it appears that the javascript > > is not being executed. > > (java excerpt) > > final WebClient webClient = new > > WebClient(BrowserVersion.INTERNET_EXPLORER_11); > > webClient.waitForBackgroundJavaScript(40000); > > HtmlPage page = > > webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); > > System.out.println(page.asXml()); > > webClient.close(); > > > > What are our options? We are trying to create html snapshots for Google > > indexing. > > > > Thanks > > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Marc G. <mgu...@ya...> - 2015-04-22 13:05:06
|
Hi, your code doesn't let HtmlUnit time to do anything with the page as you close it too early. I would rather try: final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_31); HtmlPage page = webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); webClient.waitForBackgroundJavaScript(40000); // or Thread.sleep(10000); // in case the problem comes from waitForBackgroundJavaScript System.out.println(page.asXml()); webClient.close(); Cheers, Marc. -- HtmlUnit support & consulting from the source Blog: http://mguillem.wordpress.com Le 21/04/2015 12:29, Alamgir Farouk a écrit : > our site (test) is > http://appointment-service.com/cmt2_lefoodtruck > (ignore the names, they have no meaning) > > In order to optimize loading on a mobile phone, we download the bulk of > they javascript and css dynamically, via a small javascript function. I > am not sure if this is the problem or something else is wrong, but when > I try to load this site using HtmlUnit, it appears that the javascript > is not being executed. > (java excerpt) > final WebClient webClient = new > WebClient(BrowserVersion.INTERNET_EXPLORER_11); > webClient.waitForBackgroundJavaScript(40000); > HtmlPage page = > webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); > System.out.println(page.asXml()); > webClient.close(); > > What are our options? We are trying to create html snapshots for Google > indexing. > > Thanks |
From: Ahmed A. <asa...@ya...> - 2015-04-21 10:39:40
|
Hi, You page has errors. You should wait 'after' getting the page. Please read: - http://htmlunit.sourceforge.net/faq.html#AJAXDoesNotWork - HtmlUnit – Submitting JavaScript Bugs Ahmed From: Alamgir Farouk <afa...@ho...> To: "htm...@li..." <htm...@li...> Sent: Tuesday, April 21, 2015 12:29 PM Subject: [Htmlunit-user] executing javascript which itself is dynamically loaded <!--#yiv6969796273 .yiv6969796273hmmessage P{margin:0px;padding:0px;}#yiv6969796273 body.yiv6969796273hmmessage{font-size:12pt;font-family:Calibri;}-->our site (test) is http://appointment-service.com/cmt2_lefoodtruck (ignore the names, they have no meaning) In order to optimize loading on a mobile phone, we download the bulk of they javascript and css dynamically, via a small javascript function. I am not sure if this is the problem or something else is wrong, but when I try to load this site using HtmlUnit, it appears that the javascript is not being executed. (java excerpt) final WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_11); webClient.waitForBackgroundJavaScript(40000); HtmlPage page = webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); System.out.println(page.asXml()); webClient.close(); What are our options? We are trying to create html snapshots for Google indexing. Thanks |
From: Alamgir F. <afa...@ho...> - 2015-04-21 10:29:53
|
our site (test) is http://appointment-service.com/cmt2_lefoodtruck (ignore the names, they have no meaning) In order to optimize loading on a mobile phone, we download the bulk of they javascript and css dynamically, via a small javascript function. I am not sure if this is the problem or something else is wrong, but when I try to load this site using HtmlUnit, it appears that the javascript is not being executed. (java excerpt) final WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_11); webClient.waitForBackgroundJavaScript(40000); HtmlPage page = webClient.getPage("http://appointment-service.com/cmt2_lefoodtruck"); System.out.println(page.asXml()); webClient.close(); What are our options? We are trying to create html snapshots for Google indexing. Thanks |
From: Ahmed A. <asa...@ya...> - 2015-04-20 09:23:02
|
Dear all, The team would like to announce the release of HtmlUnit 2.16. The most notable changes are: - Java 7 is required - WebClient inherits AutoClosable, so it can be used in try-with-resources statement - INTERNET_EXPLORER_8 is no more deprecated - Various fixes The full list of changes can be found in [1] Thanks to all the contributors. As always: Happy coding! [1] http://htmlunit.sourceforge.net/changes-report.html#a2.16 |
From: Vasudevan C. <vco...@gm...> - 2015-04-07 21:35:08
|
Hi, I would like to know the timeout value set in webclient will hold good for every GET & POST requests sent through that webclient instance till the webclient is closed or otherwise. If I don't get a response for one of the intermediate requests, will it throw IOException on getPage? Kindly clarify. Thanks in advance Regards VAsu |
From: Ahmed A. <asa...@ya...> - 2015-04-06 22:02:38
|
Hi all, This is currently pending NekoHtml release. I have tried to reach the main contact, but without response yet. I will try just after Easter. Ahmed > On Apr 6, 2015, at 9:09 PM, Ronald Brill <rb...@rb...> wrote: > > Any light at the end of the tunnel? > > RBRi > > >> On Tue, 3 Mar 2015 05:38:22 -0700 (MST) asashour wrote: >> >> Hi, >> >> Please note 2.16 is expected to be released around end of March 2015. >> >> Ahmed >> >> >> >> -- >> View this message in context: http://htmlunit.10904.n7.nabble.com/When-will-the-htmlunit-2-16-be-released-tp35440p35503.html >> Sent from the HtmlUnit - General mailing list archive at Nabble.com. >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming The Go Parallel Website, sponsored >> by Intel and developed in partnership with Slashdot Media, is your hub for all >> things parallel software development, from weekly thought leadership blogs to >> news, videos, case studies, tutorials and more. Take a look and join the >> conversation now. http://goparallel.sourceforge.net/ >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Ronald B. <rb...@rb...> - 2015-04-06 18:10:04
|
Any light at the end of the tunnel? RBRi On Tue, 3 Mar 2015 05:38:22 -0700 (MST) asashour wrote: > >Hi, > >Please note 2.16 is expected to be released around end of March 2015. > >Ahmed > > > >-- >View this message in context: http://htmlunit.10904.n7.nabble.com/When-will-the-htmlunit-2-16-be-released-tp35440p35503.html >Sent from the HtmlUnit - General mailing list archive at Nabble.com. > >------------------------------------------------------------------------------ >Dive into the World of Parallel Programming The Go Parallel Website, sponsored >by Intel and developed in partnership with Slashdot Media, is your hub for all >things parallel software development, from weekly thought leadership blogs to >news, videos, case studies, tutorials and more. Take a look and join the >conversation now. http://goparallel.sourceforge.net/ >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Ahmed A. <asa...@ya...> - 2015-04-03 07:09:41
|
Hi Arya, How about: final WebWindow topLevelWindow = webClient.getTopLevelWindows().get(0); topLevelWindow.setInnerWidth(10); topLevelWindow.setInnerHeight(20); topLevelWindow.setOuterWidth(30); topLevelWindow.setOuterHeight(40); Yours,Ahmed From: Arya Farzan <ary...@gm...> To: htm...@li... Sent: Friday, April 3, 2015 8:58 AM Subject: [Htmlunit-user] Set window width or resolution? Is it possible to set the width or screen resolution of a HTMLUnit WebClient?After some Googling, I did find a class in HtmlUnit called WebWindow, which contains methods such as setOuterWidth, but I am not sure how to use these methods. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Arya F. <ary...@gm...> - 2015-04-03 06:58:37
|
Is it possible to set the width or screen resolution of a HTMLUnit WebClient? After some Googling, I did find a class in HtmlUnit called WebWindow, which contains methods such as setOuterWidth, but I am not sure how to use these methods. |
From: Грицак О. О. <Gri...@su...> - 2015-04-02 10:19:12
|
Indeed, HtmlPage pageResults contains updated DOM after all, so this problem doesn't exist. For two days I thought it is only available through asXml() method. Thank you very much! |
From: Ronald B. <rb...@rb...> - 2015-04-02 09:21:40
|
Without more details we can only guess what our problem is. Maybe you have to wait after the click for all the javascript /ajax takes place (see for more http://htmlunit.sourceforge.net/faq.html#AJAXDoesNotWork) Does pageResult.asXml() contain the stuff your are looking for? RBRi -------------------------- Wetator Smart web application testing http://www.wetator.org On Thu, 2 Apr 2015 08:21:03 +0000 wrote: > >Hello, dear sirs! > >I need to automate some searches on a heavily AJAXed web-site (not public). > >Filling input and "pushing" search-button works fine. > >HtmlPage pageResults = linkSearch.click(); > >webClient.setAjaxController(newNicelyResynchronizingAjaxController());WriteFile(pageResults.asXml(),"R"); > >My problem is that search results are generated by JavaScript (tables, divs, rows et c). > >When I try to search DOM elements in > >HtmlPage pageResults > >I do not get any results. > >If I convert pageResults with method .asXml() to string I lose ability to execute farther JavaScript (click() buttons and so on). > >Is the problem solvable in 2.15? Can I convert String with XML back to HtmlPage? > >Thank you in advance. > > >----< Inline text [text-plain-04.txt] >------------------ > >------------------------------------------------------------------------------ >Dive into the World of Parallel Programming The Go Parallel Website, sponsored >by Intel and developed in partnership with Slashdot Media, is your hub for all >things parallel software development, from weekly thought leadership blogs to >news, videos, case studies, tutorials and more. Take a look and join the >conversation now. http://goparallel.sourceforge.net/ > > >----< Inline text [text-plain-05.txt] >------------------ > >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |
From: Грицак О. О. <Gri...@su...> - 2015-04-02 08:57:15
|
Hello, dear sirs! I need to automate some searches on a heavily AJAXed web-site (not public). Filling input and "pushing" search-button works fine. HtmlPage pageResults = linkSearch.click(); webClient.setAjaxController(newNicelyResynchronizingAjaxController());WriteFile(pageResults.asXml(),"R"); My problem is that search results are generated by JavaScript (tables, divs, rows et c). When I try to search DOM elements in HtmlPage pageResults I do not get any results. If I convert pageResults with method .asXml() to string I lose ability to execute farther JavaScript (click() buttons and so on). Is the problem solvable in 2.15? Can I convert String with XML back to HtmlPage? Thank you in advance. |