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: Martin S. <mar...@bi...> - 2015-08-15 11:39:32
|
Hi Ronald, Many thanks for your fast response! I have tried your hints but it is still not working. I switched to using FF38. I've set: webClient.getOptions().setThrowExceptionOnScriptError(true); webClient.getOptions().setThrowExceptionOnFailingStatusCode(true); webClient.setAjaxController(new NicelyResynchronizingAjaxController()); but get no exceptions. I also tried this to detect if the web page changes at some delayed time after clicking , but it never does. The web page before and after clicking is always one and the same (can this be right?) and the wait loop never ends: WebWindow window = webpage.getEnclosingWindow(); clickElement(nextButton); while (window.getEnclosedPage() == webpage) { Thread.sleep(1000); } // Never comes out of this loop! newWebpage = window.getEnclosedPage(); Can you tell me how to switch logging on to get the diagnostics that would show what is happening? Anything else I can try to get it to work? Thanks, Martin -- _____________________________________________________ Dr Martin Strange 20 The Boulevard, Bellevue Heights SA 5050, Australia Ph/fax: +61 8 8278 3953 Mob: 0431 691071 Email: mar...@bi... |
From: Ronald B. <rb...@rb...> - 2015-08-15 10:12:11
|
Hi Martin, have not done a detailed analysis but some hints: * use FF38 instead of Chrome, the FF simulation is the most complete one at the moment * it's not that uncommon for todays web apps that clicking a button does not directly return the new page (thanks AJAX). You already did some wait after the click, but you have to get the current content/page after the wait for doing the next steps (use WebWindow#getEnclosedPage); this wait stuff is the most tricky part of driving moder web applications.... * have a look at the log output and search for js errors - if you are facing such errors please report them to the html unit bug tracker (have a look at http://htmlunit.sourceforge.net/submittingBugs.html and http://htmlunit.sourceforge.net/submittingJSBugs.html before) Hope that helps a bit RBRi -------------------------- WETATOR Smart web application testing http://www.wetator.org On Sat, 15 Aug 2015 18:19:50 +0930 Martin Strange wrote: > >Does anyone know how to log into Google (Google Sites) using HtmlUnit? > >I have been using BrowserVersion.CHROME from HtmlUnit-2.18. Login is a two-step process involving two forms. The first form has just the email field and the 'Next' button. After entering an email address and clicking 'Next', the second form >displays. This form has the password field and the 'Sign in' button to complete the login process. > >Here is the code I am using: > >|HtmlForm form= (HtmlForm) webpage.getElementById("gaia_loginform"); >HtmlTextInput email= (HtmlTextInput) webpage.getElementById("Email"); >email.setValueAttribute("MyEmailAddress"); >HtmlSubmitInput nextButton= form.getInputByValue("Next"); >newWebpage= clickElement(nextButton); >|||webclient.waitForBackgroundJavaScriptStartingBefore(8000); >|HtmlForm form2= (HtmlForm) newWebpage.getElementById("gaia_loginform"); >HtmlPasswordInput password= (HtmlPasswordInput) newWebpage.getElementById("Passwd-hidden"); >password.setValueAttribute("MyPassword"); >HtmlSubmitInput signInButton= form2.getInputByValue("Sign in"); >myGoogleSitesHomeWebpage= clickElement(signInButton); >||webclient.waitForBackgroundJavaScriptStartingBefore(8000);| > >|clickElement(nextButton) |does not advance to a second form with the 'Sign in' button. It has my Google Sites web page I am trying to log into and my email correctly set up in the second form, but still with the link showing 'Next'. I also think the >input elements id="Email" and id="Passwd-hidden" are wrong and should be id="Email-hidden" and id="Passwd". Here are the relevant parts of the second form. > >|<form novalidate="" method="post" action="https://accounts.google.com/ServiceLoginAuth" id="gaia_loginform"> ><input name="continue" type="hidden" value="https://sites.google.com/site/MyGoogleSitesHomePageAddress"/> ><input id="Email" name="Email" placeholder="Enter your email" type="email" value="MyEmailAddress" spellcheck="false" autofocus=""/> ><input id="Passwd-hidden" type="password" spellcheck="false" class="hidden"/> ><input id="next" name="signIn" class="rc-button rc-button-submit" type="submit" value="Next"/> ><input id="signIn" name="signIn" class="rc-button rc-button-submit" type="submit" value="Sign in"/> ></form>| > >Could anyone tell me what I am doing wrong and show me the code I should be using to do the complete login process? Many thanks, that would help me so much! > >Martin > >Email: mar...@bi... >Or mar...@us... > > > > >----< Inline text [text-plain-04.txt] >------------------ > >------------------------------------------------------------------------------ > > > >----< Inline text [text-plain-05.txt] >------------------ > >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |
From: Martin S. <mar...@bi...> - 2015-08-15 08:50:02
|
Does anyone know how to log into Google (Google Sites) using HtmlUnit? I have been using BrowserVersion.CHROME from HtmlUnit-2.18. Login is a two-step process involving two forms. The first form has just the email field and the ‘Next’ button. After entering an email address and clicking ‘Next’, the second form displays. This form has the password field and the ‘Sign in’ button to complete the login process. Here is the code I am using: |HtmlForm form= (HtmlForm) webpage.getElementById("gaia_loginform"); HtmlTextInput email= (HtmlTextInput) webpage.getElementById("Email"); email.setValueAttribute("MyEmailAddress"); HtmlSubmitInput nextButton= form.getInputByValue("Next"); newWebpage= clickElement(nextButton); |||webclient.waitForBackgroundJavaScriptStartingBefore(8000); |HtmlForm form2= (HtmlForm) newWebpage.getElementById("gaia_loginform"); HtmlPasswordInput password= (HtmlPasswordInput) newWebpage.getElementById("Passwd-hidden"); password.setValueAttribute("MyPassword"); HtmlSubmitInput signInButton= form2.getInputByValue("Sign in"); myGoogleSitesHomeWebpage= clickElement(signInButton); ||webclient.waitForBackgroundJavaScriptStartingBefore(8000);| |clickElement(nextButton) |does not advance to a second form with the ‘Sign in’ button. It has my Google Sites web page I am trying to log into and my email correctly set up in the second form, but still with the link showing ‘Next’. I also think the input elements id="Email” and id="Passwd-hidden” are wrong and should be id="Email-hidden” and id="Passwd”. Here are the relevant parts of the second form. |<form novalidate="" method="post" action="https://accounts.google.com/ServiceLoginAuth" id="gaia_loginform"> <input name="continue" type="hidden" value="https://sites.google.com/site/MyGoogleSitesHomePageAddress"/> <input id="Email" name="Email" placeholder="Enter your email" type="email" value="MyEmailAddress" spellcheck="false" autofocus=""/> <input id="Passwd-hidden" type="password" spellcheck="false" class="hidden"/> <input id="next" name="signIn" class="rc-button rc-button-submit" type="submit" value="Next"/> <input id="signIn" name="signIn" class="rc-button rc-button-submit" type="submit" value="Sign in"/> </form>| Could anyone tell me what I am doing wrong and show me the code I should be using to do the complete login process? Many thanks, that would help me so much! Martin Email: mar...@bi... Or mar...@us... |
From: Parham, C. <cp...@bi...> - 2015-08-13 18:17:32
|
Hi Ahmed, I did attach three files to my earlier email: FirefoxFileUpload.txt – shows POST that Charles captured for FireFox HTMLUnitFileUpload.txt – shows POST that Charles captured for HTMLUnit HTMLUnitTestCase.java – code to reproduce I see them attached in my Sent Items. Should I send them another way? Also, the id that you have in your code “j_idt1245:upload” sometimes changes on the site when they update it. Today the id is “j_idt498:upload”. Thanks. From: Ahmed Ashour [mailto:asa...@ya...] Sent: Thursday, August 13, 2015 1:44 PM To: htm...@li... Subject: Re: [Htmlunit-user] RichFaces 4 fileUpload Hi again, There are no POST requests by Charles for the below code. Please post your code and provide compared results. Ahmed @Test public void testRichFacesFileUpload() throws Exception { final CollectingAlertHandler handler = new CollectingAlertHandler(); try (final WebClient webClient = new WebClient(BrowserVersion.CHROME, "localhost", 8888)){ webClient.setAlertHandler(handler); webClient.setAjaxController(new NicelyResynchronizingAjaxController()); String url = "http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=fileUpload&skin=blueSky"; HtmlPage page = webClient.getPage(url); // choose file to upload HtmlInput htmlInput = (HtmlInput) page.getByXPath("//input[@type='file']").get(0); page = (HtmlPage) htmlInput.setValueAttribute("C:\\use\\chrome.PNG"); // click Upload button HtmlElement element = (HtmlElement) page.getByXPath( "//*[@id='j_idt1245:upload']/div[1]/span[1]/span[2]/span").get( 0); page = (HtmlPage) element.click(); } catch(Exception e) { System.out.println(e.getMessage()); } for (String x : handler.getCollectedAlerts()) { System.err.println(x); } } ________________________________ From: "Parham, Clinton" <cp...@bi...<mailto:cp...@bi...>> To: Ahmed Ashour <asa...@ya...<mailto:asa...@ya...>>; "htm...@li...<mailto:htm...@li...>" <htm...@li...<mailto:htm...@li...>> Sent: Thursday, August 13, 2015 5:12 AM Subject: Re: [Htmlunit-user] RichFaces 4 fileUpload Hi Ahmed, I have tested with the snapshot and get further. I no longer get script errors but the upload still doesn’t work. I’ve looked at the raw POST requests from HTMLUnit and compared to Firefox using Charles Proxy. They are quite different. I captured the requests when clicking the Upload button. Can you take a look and see what you think the problem might be? Thank you. ________________________________ The contents contained herein may contain confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or action taken on the contents is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete this message. |
From: Ahmed A. <asa...@ya...> - 2015-08-13 17:47:10
|
Hi again, There are no POST requests by Charles for the below code. Please post your code and provide compared results. Ahmed @Test public void testRichFacesFileUpload() throws Exception { final CollectingAlertHandler handler = new CollectingAlertHandler(); try (final WebClient webClient = new WebClient(BrowserVersion.CHROME, "localhost", 8888)){ webClient.setAlertHandler(handler); webClient.setAjaxController(new NicelyResynchronizingAjaxController()); String url = "http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=fileUpload&skin=blueSky"; HtmlPage page = webClient.getPage(url); // choose file to upload HtmlInput htmlInput = (HtmlInput) page.getByXPath("//input[@type='file']").get(0); page = (HtmlPage) htmlInput.setValueAttribute("C:\\use\\chrome.PNG"); // click Upload button HtmlElement element = (HtmlElement) page.getByXPath( "//*[@id='j_idt1245:upload']/div[1]/span[1]/span[2]/span").get( 0); page = (HtmlPage) element.click(); } catch(Exception e) { System.out.println(e.getMessage()); } for (String x : handler.getCollectedAlerts()) { System.err.println(x); } } From: "Parham, Clinton" <cp...@bi...> To: Ahmed Ashour <asa...@ya...>; "htm...@li..." <htm...@li...> Sent: Thursday, August 13, 2015 5:12 AM Subject: Re: [Htmlunit-user] RichFaces 4 fileUpload Hi Ahmed, I have tested with the snapshot and get further. I no longer get script errors but the upload still doesn’t work. I’ve looked at the raw POST requests from HTMLUnit and compared to Firefox using Charles Proxy. They are quite different. I captured the requests when clicking the Upload button. Can you take a look and see what you think the problem might be? Thank you. #yiv6884170387 #yiv6884170387 -- _filtered #yiv6884170387 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv6884170387 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv6884170387 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv6884170387 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv6884170387 {font-family:HelveticaNeue;}#yiv6884170387 #yiv6884170387 p.yiv6884170387MsoNormal, #yiv6884170387 li.yiv6884170387MsoNormal, #yiv6884170387 div.yiv6884170387MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv6884170387 a:link, #yiv6884170387 span.yiv6884170387MsoHyperlink {color:blue;text-decoration:underline;}#yiv6884170387 a:visited, #yiv6884170387 span.yiv6884170387MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv6884170387 p.yiv6884170387msoacetate, #yiv6884170387 li.yiv6884170387msoacetate, #yiv6884170387 div.yiv6884170387msoacetate {margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv6884170387 p.yiv6884170387msonormal, #yiv6884170387 li.yiv6884170387msonormal, #yiv6884170387 div.yiv6884170387msonormal {margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv6884170387 p.yiv6884170387msonormal1, #yiv6884170387 li.yiv6884170387msonormal1, #yiv6884170387 div.yiv6884170387msonormal1 {margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv6884170387 p.yiv6884170387msochpdefault, #yiv6884170387 li.yiv6884170387msochpdefault, #yiv6884170387 div.yiv6884170387msochpdefault {margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv6884170387 span.yiv6884170387msohyperlink {}#yiv6884170387 span.yiv6884170387msohyperlinkfollowed {}#yiv6884170387 span.yiv6884170387msohyperlink1 {}#yiv6884170387 span.yiv6884170387msohyperlinkfollowed1 {}#yiv6884170387 span.yiv6884170387emailstyle171 {}#yiv6884170387 span.yiv6884170387emailstyle27 {}#yiv6884170387 p.yiv6884170387msonormal2, #yiv6884170387 li.yiv6884170387msonormal2, #yiv6884170387 div.yiv6884170387msonormal2 {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv6884170387 span.yiv6884170387msohyperlink2 {color:blue;text-decoration:underline;}#yiv6884170387 span.yiv6884170387msohyperlinkfollowed2 {color:purple;text-decoration:underline;}#yiv6884170387 p.yiv6884170387msoacetate1, #yiv6884170387 li.yiv6884170387msoacetate1, #yiv6884170387 div.yiv6884170387msoacetate1 {margin:0in;margin-bottom:.0001pt;font-size:8.0pt;}#yiv6884170387 p.yiv6884170387msonormal3, #yiv6884170387 li.yiv6884170387msonormal3, #yiv6884170387 div.yiv6884170387msonormal3 {margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv6884170387 p.yiv6884170387msonormal11, #yiv6884170387 li.yiv6884170387msonormal11, #yiv6884170387 div.yiv6884170387msonormal11 {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;}#yiv6884170387 span.yiv6884170387msohyperlink11 {color:blue;text-decoration:underline;}#yiv6884170387 span.yiv6884170387msohyperlinkfollowed11 {color:purple;text-decoration:underline;}#yiv6884170387 span.yiv6884170387emailstyle1711 {color:windowtext;}#yiv6884170387 span.yiv6884170387emailstyle271 {color:#1F497D;}#yiv6884170387 p.yiv6884170387msochpdefault1, #yiv6884170387 li.yiv6884170387msochpdefault1, #yiv6884170387 div.yiv6884170387msochpdefault1 {margin-right:0in;margin-left:0in;font-size:10.0pt;}#yiv6884170387 span.yiv6884170387EmailStyle38 {color:#1F497D;}#yiv6884170387 .yiv6884170387MsoChpDefault {font-size:10.0pt;} _filtered #yiv6884170387 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv6884170387 div.yiv6884170387WordSection1 {}#yiv6884170387 |
From: Parham, C. <cp...@bi...> - 2015-08-13 03:12:21
|
POST /richfaces/component-sample.jsf;jsessionid=soXVJJpi8TGUWCqroxWFApTB?rf_fu_uid=0.8202501885813719&javax.faces.partial.ajax=true&javax.faces.source=j_idt1735:upload&javax.faces.partial.execute=j_idt1735:upload&org.richfaces.ajax.component=j_idt1735:upload&javax.faces.ViewState=4851658137619826044:-2769993515735120836 HTTP/1.1 X-Sophos-Filter: 0012b287c92f1d4abb2ac36be4149c10762d7d6e Host: showcase.richfaces.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Faces-Request: partial/ajax Referer: http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=fileUpload&skin=blueSky Content-Length: 6814 Content-Type: multipart/form-data; boundary=---------------------------176561721431339 Cookie: __utma=143911734.1939771183.1381857271.1438891755.1439394268.19; __utmz=143911734.1435709828.15.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); JSESSIONID=soXVJJpi8TGUWCqroxWFApTB; __utmc=143911734 Connection: keep-alive Pragma: no-cache Cache-Control: no-cache -----------------------------176561721431339 Content-Disposition: form-data; name="j_idt1735" j_idt1735 -----------------------------176561721431339 Content-Disposition: form-data; name="javax.faces.ViewState" 4851658137619826044:-2769993515735120836 -----------------------------176561721431339 Content-Disposition: form-data; name="j_idt1735:upload"; filename="KYN_TopLeft.PNG" Content-Type: image/png ÂPNG |
From: Rich G. <ri...@um...> - 2015-08-13 00:26:24
|
Ah, this was an issue with the website. I had to load the page: http://alisondb.legislature.state.al.us/Alison/SESSBillsList.aspx?STATUSCODES=Had%20First%20Reading%20House%20of%20Origin&BODY=1755 and then load the provided link. Thanks for thinking about this. -Rich On Wed, Aug 12, 2015 at 6:57 PM, Rich Goldman <ri...@um...> wrote: > Right, that is static text. It doesn't include the legislation title, > related documents, legislative actions, and other information that loads > when using a web browser. > > > On Wednesday, August 12, 2015, Ahmed Ashour <asa...@ya...> wrote: > >> Hi Rich, >> >> Please be more specific. >> >> Using latest snapshot, INTERNET_EXPLORER_8, and .asText(), I get the >> below, which is similar to what is in the website. >> >> >> Alabama Legislature >> First Special Session 2015 >> >> >> >> Home >> Session Information >> Code of Alabama >> Constitution >> House of Representatives >> Senate >> Help >> Contact Us >> Legislative Day >> Console >> Bills >> Resolutions >> Confirmations >> Committee Meetings >> Interim Meetings & >> Announcements >> Reports >> Adjourn Convene >> Legislative Audio/Video >> Bill Status for HB1 () >> Not Official Information from the Legislative Offices >> Document Quick Links >> Legislative Process >> Legislative Glossary >> Alabama Legislature >> The Legislature convenes in regular annual sessions on the first Tuesday >> in February, except (1) in the first year of the four-year term, when the >> session will begin on the first Tuesday in March, and (2) in the last year >> of a four-year term, when the session will begin on the second Tuesday in >> January. The length of the regular session is limited to 30 meeting days >> within a period of 105 calendar days. There are usually two meeting or >> "legislative" days per week, with other days devoted to committee meetings. >> Special sessions of the Legislature may be called by the Governor, with the >> Proclamation listing the subjects which the Governor wishes considered. >> These sessions are limited to 12 legislative days within a 30 calendar day >> span. In a regular session, bills may be enacted on any subject. In a >> special session, legislation must be enacted only on those subjects which >> the Governor announces in his proclamation or "call." Anything not in the >> "call" requires a two-thirds vote of each house to be enacted. >> Alabama Legislature >> >> >> ------------------------------ >> *From:* Rich Goldman <ri...@um...> >> *To:* Ahmed Ashour <asa...@ya...>; " >> htm...@li..." <htm...@li...> >> >> *Sent:* Thursday, August 13, 2015 12:30 AM >> *Subject:* Re: [Htmlunit-user] Help Extracting Schedule from a Website >> >> >> >> [image: Boxbe] <https://www.boxbe.com/overview> This message is eligible >> for Automatic Cleanup! (ri...@um...) Add cleanup rule >> <https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Ftoken%3DAMgvRVPUwyF2iRLLTI0umlXbZ6SAWgjct8HRmSQZ9JdmzVFeVOAZ4HzjNoYTF6bGFVyvLcO1NYQmjge%252BLLJemjtvWsxiczf3dzdjoZQBcA1mX4T4GWxwO5BOcU2reMr9XexwsK956GY%253D%26key%3Dv2%252Bzz5t79i%252FU%252F0TwW0y%252Fn060KVhYo7FuIAD%252BeRhm0Ng%253D&tc_serial=22274169521&tc_rand=840714072&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001> >> | More info >> <http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc_serial=22274169521&tc_rand=840714072&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001> >> >> If you go to the webpage in a browser you'll get all sorts of information >> on a piece of legislation. This code simply returns the template without >> any data/html populated. Does this make sense? >> >> On Wednesday, August 12, 2015, Ahmed Ashour <asa...@ya...> wrote: >> >> Hi, >> >> You can also use Thread.sleep(). >> >> What is missing (not loaded)? >> >> Please read http://htmlunit.sourceforge.net/submittingJSBugs.html >> >> Ahmed >> >> ------------------------------ >> *From:* Rich Goldman <ri...@um...> >> *To:* htm...@li... >> *Sent:* Wednesday, August 12, 2015 10:22 PM >> *Subject:* Re: [Htmlunit-user] Help Extracting Schedule from a Website >> >> >> >> I am trying to get the populated HTML of another site but it is not >> loading, despite putting the wait time to 30 seconds. >> >> The address is >> http://alisondb.legislature.state.al.us/Alison/SESSBillResult.aspx?BILL=HB1&WIN_TYPE=SELECTED_STATUS >> >> >> Are you all able to get page.asXml(); to produce populated html for >> this address? >> >> I've updated to 2.18 and I've tried putting >> the waitForBackgroundJavaScript in multiple places without success. My code >> is: >> >> public String getWebsiteTextWithJavaScript(String url) { >> WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_6); >> HtmlPage page = null; >> try { >> webClient.waitForBackgroundJavaScript(30000); >> page = webClient.getPage(url); >> } catch (FailingHttpStatusCodeException e) { >> // TODO Auto-generated catch block >> e.printStackTrace(); >> } catch (MalformedURLException e) { >> // TODO Auto-generated catch block >> e.printStackTrace(); >> } catch (IOException e) { >> // TODO Auto-generated catch block >> e.printStackTrace(); >> } >> // >> // // Thread.sleep(10000); >> webClient.waitForBackgroundJavaScript(30000); >> String text = page.asXml(); >> webClient.waitForBackgroundJavaScript(30000); >> page.cleanUp(); >> webClient.closeAllWindows(); >> >> return text; >> } >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> >> >> >> |
From: Rich G. <ri...@um...> - 2015-08-12 22:58:18
|
Right, that is static text. It doesn't include the legislation title, related documents, legislative actions, and other information that loads when using a web browser. On Wednesday, August 12, 2015, Ahmed Ashour <asa...@ya...> wrote: > Hi Rich, > > Please be more specific. > > Using latest snapshot, INTERNET_EXPLORER_8, and .asText(), I get the > below, which is similar to what is in the website. > > > Alabama Legislature > First Special Session 2015 > > > > Home > Session Information > Code of Alabama > Constitution > House of Representatives > Senate > Help > Contact Us > Legislative Day > Console > Bills > Resolutions > Confirmations > Committee Meetings > Interim Meetings & > Announcements > Reports > Adjourn Convene > Legislative Audio/Video > Bill Status for HB1 () > Not Official Information from the Legislative Offices > Document Quick Links > Legislative Process > Legislative Glossary > Alabama Legislature > The Legislature convenes in regular annual sessions on the first Tuesday > in February, except (1) in the first year of the four-year term, when the > session will begin on the first Tuesday in March, and (2) in the last year > of a four-year term, when the session will begin on the second Tuesday in > January. The length of the regular session is limited to 30 meeting days > within a period of 105 calendar days. There are usually two meeting or > "legislative" days per week, with other days devoted to committee meetings. > Special sessions of the Legislature may be called by the Governor, with the > Proclamation listing the subjects which the Governor wishes considered. > These sessions are limited to 12 legislative days within a 30 calendar day > span. In a regular session, bills may be enacted on any subject. In a > special session, legislation must be enacted only on those subjects which > the Governor announces in his proclamation or "call." Anything not in the > "call" requires a two-thirds vote of each house to be enacted. > Alabama Legislature > > > ------------------------------ > *From:* Rich Goldman <ri...@um... > <javascript:_e(%7B%7D,'cvml','ri...@um...');>> > *To:* Ahmed Ashour <asa...@ya... > <javascript:_e(%7B%7D,'cvml','asa...@ya...');>>; " > htm...@li... > <javascript:_e(%7B%7D,'cvml','htm...@li...');>" < > htm...@li... > <javascript:_e(%7B%7D,'cvml','htm...@li...');>> > *Sent:* Thursday, August 13, 2015 12:30 AM > *Subject:* Re: [Htmlunit-user] Help Extracting Schedule from a Website > > > > [image: Boxbe] <https://www.boxbe.com/overview> This message is eligible > for Automatic Cleanup! (ri...@um... > <javascript:_e(%7B%7D,'cvml','ri...@um...');>) Add cleanup rule > <https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Ftoken%3DAMgvRVPUwyF2iRLLTI0umlXbZ6SAWgjct8HRmSQZ9JdmzVFeVOAZ4HzjNoYTF6bGFVyvLcO1NYQmjge%252BLLJemjtvWsxiczf3dzdjoZQBcA1mX4T4GWxwO5BOcU2reMr9XexwsK956GY%253D%26key%3Dv2%252Bzz5t79i%252FU%252F0TwW0y%252Fn060KVhYo7FuIAD%252BeRhm0Ng%253D&tc_serial=22274169521&tc_rand=840714072&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001> > | More info > <http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc_serial=22274169521&tc_rand=840714072&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001> > > If you go to the webpage in a browser you'll get all sorts of information > on a piece of legislation. This code simply returns the template without > any data/html populated. Does this make sense? > > On Wednesday, August 12, 2015, Ahmed Ashour <asa...@ya... > <javascript:_e(%7B%7D,'cvml','asa...@ya...');>> wrote: > > Hi, > > You can also use Thread.sleep(). > > What is missing (not loaded)? > > Please read http://htmlunit.sourceforge.net/submittingJSBugs.html > > Ahmed > > ------------------------------ > *From:* Rich Goldman <ri...@um...> > *To:* htm...@li... > *Sent:* Wednesday, August 12, 2015 10:22 PM > *Subject:* Re: [Htmlunit-user] Help Extracting Schedule from a Website > > > > I am trying to get the populated HTML of another site but it is not > loading, despite putting the wait time to 30 seconds. > > The address is > http://alisondb.legislature.state.al.us/Alison/SESSBillResult.aspx?BILL=HB1&WIN_TYPE=SELECTED_STATUS > > > Are you all able to get page.asXml(); to produce populated html for this > address? > > I've updated to 2.18 and I've tried putting > the waitForBackgroundJavaScript in multiple places without success. My code > is: > > public String getWebsiteTextWithJavaScript(String url) { > WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_6); > HtmlPage page = null; > try { > webClient.waitForBackgroundJavaScript(30000); > page = webClient.getPage(url); > } catch (FailingHttpStatusCodeException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (MalformedURLException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (IOException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > // > // // Thread.sleep(10000); > webClient.waitForBackgroundJavaScript(30000); > String text = page.asXml(); > webClient.waitForBackgroundJavaScript(30000); > page.cleanUp(); > webClient.closeAllWindows(); > > return text; > } > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > <javascript:_e(%7B%7D,'cvml','Htm...@li...');> > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > |
From: Ahmed A. <asa...@ya...> - 2015-08-12 22:47:13
|
Hi Rich, Please be more specific. Using latest snapshot, INTERNET_EXPLORER_8, and .asText(), I get the below, which is similar to what is in the website. Alabama LegislatureFirst Special Session 2015 HomeSession InformationCode of AlabamaConstitutionHouse of RepresentativesSenateHelpContact UsLegislative DayConsoleBillsResolutionsConfirmationsCommittee MeetingsInterim Meetings & AnnouncementsReportsAdjourn ConveneLegislative Audio/VideoBill Status for HB1 ()Not Official Information from the Legislative OfficesDocument Quick LinksLegislative ProcessLegislative GlossaryAlabama LegislatureThe Legislature convenes in regular annual sessions on the first Tuesday in February, except (1) in the first year of the four-year term, when the session will begin on the first Tuesday in March, and (2) in the last year of a four-year term, when the session will begin on the second Tuesday in January. The length of the regular session is limited to 30 meeting days within a period of 105 calendar days. There are usually two meeting or "legislative" days per week, with other days devoted to committee meetings. Special sessions of the Legislature may be called by the Governor, with the Proclamation listing the subjects which the Governor wishes considered. These sessions are limited to 12 legislative days within a 30 calendar day span. In a regular session, bills may be enacted on any subject. In a special session, legislation must be enacted only on those subjects which the Governor announces in his proclamation or "call." Anything not in the "call" requires a two-thirds vote of each house to be enacted.Alabama Legislature From: Rich Goldman <ri...@um...> To: Ahmed Ashour <asa...@ya...>; "htm...@li..." <htm...@li...> Sent: Thursday, August 13, 2015 12:30 AM Subject: Re: [Htmlunit-user] Help Extracting Schedule from a Website This message is eligible for Automatic Cleanup! (ri...@um...) Add cleanup rule | More info If you go to the webpage in a browser you'll get all sorts of information on a piece of legislation. This code simply returns the template without any data/html populated. Does this make sense? On Wednesday, August 12, 2015, Ahmed Ashour <asa...@ya...> wrote: Hi, You can also use Thread.sleep(). What is missing (not loaded)? Please read http://htmlunit.sourceforge.net/submittingJSBugs.html Ahmed From: Rich Goldman <ri...@um...> To: htm...@li... Sent: Wednesday, August 12, 2015 10:22 PM Subject: Re: [Htmlunit-user] Help Extracting Schedule from a Website I am trying to get the populated HTML of another site but it is not loading, despite putting the wait time to 30 seconds. The address is http://alisondb.legislature.state.al.us/Alison/SESSBillResult.aspx?BILL=HB1&WIN_TYPE=SELECTED_STATUS Are you all able to get page.asXml(); to produce populated html for this address? I've updated to 2.18 and I've tried putting the waitForBackgroundJavaScript in multiple places without success. My code is: public String getWebsiteTextWithJavaScript(String url) { WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_6); HtmlPage page = null; try { webClient.waitForBackgroundJavaScript(30000); page = webClient.getPage(url); } catch (FailingHttpStatusCodeException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } // // // Thread.sleep(10000); webClient.waitForBackgroundJavaScript(30000); String text = page.asXml(); webClient.waitForBackgroundJavaScript(30000); page.cleanUp(); webClient.closeAllWindows(); return text; } ------------------------------------------------------------------------------ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Rich G. <ri...@um...> - 2015-08-12 22:30:53
|
If you go to the webpage in a browser you'll get all sorts of information on a piece of legislation. This code simply returns the template without any data/html populated. Does this make sense? On Wednesday, August 12, 2015, Ahmed Ashour <asa...@ya...> wrote: > Hi, > > You can also use Thread.sleep(). > > What is missing (not loaded)? > > Please read http://htmlunit.sourceforge.net/submittingJSBugs.html > > Ahmed > > ------------------------------ > *From:* Rich Goldman <ri...@um... > <javascript:_e(%7B%7D,'cvml','ri...@um...');>> > *To:* htm...@li... > <javascript:_e(%7B%7D,'cvml','htm...@li...');> > *Sent:* Wednesday, August 12, 2015 10:22 PM > *Subject:* Re: [Htmlunit-user] Help Extracting Schedule from a Website > > > > I am trying to get the populated HTML of another site but it is not > loading, despite putting the wait time to 30 seconds. > > The address is > http://alisondb.legislature.state.al.us/Alison/SESSBillResult.aspx?BILL=HB1&WIN_TYPE=SELECTED_STATUS > > > Are you all able to get page.asXml(); to produce populated html for this > address? > > I've updated to 2.18 and I've tried putting > the waitForBackgroundJavaScript in multiple places without success. My code > is: > > public String getWebsiteTextWithJavaScript(String url) { > WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_6); > HtmlPage page = null; > try { > webClient.waitForBackgroundJavaScript(30000); > page = webClient.getPage(url); > } catch (FailingHttpStatusCodeException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (MalformedURLException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (IOException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > // > // // Thread.sleep(10000); > webClient.waitForBackgroundJavaScript(30000); > String text = page.asXml(); > webClient.waitForBackgroundJavaScript(30000); > page.cleanUp(); > webClient.closeAllWindows(); > > return text; > } > |
From: Ahmed A. <asa...@ya...> - 2015-08-12 22:20:50
|
Hi, You can also use Thread.sleep(). What is missing (not loaded)? Please read http://htmlunit.sourceforge.net/submittingJSBugs.html Ahmed From: Rich Goldman <ri...@um...> To: htm...@li... Sent: Wednesday, August 12, 2015 10:22 PM Subject: Re: [Htmlunit-user] Help Extracting Schedule from a Website I am trying to get the populated HTML of another site but it is not loading, despite putting the wait time to 30 seconds. The address is http://alisondb.legislature.state.al.us/Alison/SESSBillResult.aspx?BILL=HB1&WIN_TYPE=SELECTED_STATUS Are you all able to get page.asXml(); to produce populated html for this address? I've updated to 2.18 and I've tried putting the waitForBackgroundJavaScript in multiple places without success. My code is: public String getWebsiteTextWithJavaScript(String url) { WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_6); HtmlPage page = null; try { webClient.waitForBackgroundJavaScript(30000); page = webClient.getPage(url); } catch (FailingHttpStatusCodeException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } // // // Thread.sleep(10000); webClient.waitForBackgroundJavaScript(30000); String text = page.asXml(); webClient.waitForBackgroundJavaScript(30000); page.cleanUp(); webClient.closeAllWindows(); return text; } |
From: Rich G. <ri...@um...> - 2015-08-12 20:47:51
|
I am trying to get the populated HTML of another site but it is not loading, despite putting the wait time to 30 seconds. The address is http://alisondb.legislature.state.al.us/Alison/SESSBillResult.aspx?BILL=HB1&WIN_TYPE=SELECTED_STATUS Are you all able to get page.asXml(); to produce populated html for this address? I've updated to 2.18 and I've tried putting the waitForBackgroundJavaScript in multiple places without success. My code is: public String getWebsiteTextWithJavaScript(String url) { WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_6); HtmlPage page = null; try { webClient.waitForBackgroundJavaScript(30000); page = webClient.getPage(url); } catch (FailingHttpStatusCodeException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } // // // Thread.sleep(10000); webClient.waitForBackgroundJavaScript(30000); String text = page.asXml(); webClient.waitForBackgroundJavaScript(30000); page.cleanUp(); webClient.closeAllWindows(); return text; } On Thu, Mar 5, 2015 at 8:21 PM, Rich Goldman <ri...@um...> wrote: > Sorry, ignore this...another newbie error. > -Rich > > On Thu, Mar 5, 2015 at 1:09 PM, Rich Goldman <ri...@um...> wrote: > >> One followup: >> >> I'm trying to get the HTML (mainly the link urls) included in some of the >> agendas but it's not coming through using: >> >> WebClient webClient = new WebClient(BrowserVersion.CHROME); >> HtmlPage page = webClient.getPage(" >> http://www.house.leg.state.mn.us/schedules/schedule.aspx#03/04/2015"); >> Thread.sleep(10000); >> System.out.println(page.asXml()); >> >> Is there something I need to do in order to get/keep the html rendering? >> >> I get (3/4/2015) HF0416-A15-0112.pdf instead of that text with the link >> to the pdf file... >> -Rich >> >> On Wed, Mar 4, 2015 at 11:45 AM, Ahmed Ashour <asa...@ya...> wrote: >> >>> Hi Rich, >>> >>> Well, waitForBackground is actually better than Thread.sleep(), and it >>> works. >>> >>> It didn't work with you before, because you used it 'before' >>> webClient.getPage(), however it should be 'after', to allow JavaScript/AJAX >>> to run. >>> >>> Hope that clarifies, >>> >>> Ahmed >>> ------------------------------ >>> *From:* Rich Goldman <ri...@um...> >>> *To:* htm...@li... >>> *Sent:* Wednesday, March 4, 2015 4:56 PM >>> *Subject:* Re: [Htmlunit-user] Help Extracting Schedule from a Website >>> >>> I think I was confused between using Thread.sleep(10000) >>> and webClient.waitForBackgroundJavaScript(10000). >>> >>> Thanks again. >>> -Rich >>> >>> >>> >>> On Wed, Mar 4, 2015 at 10:21 AM, Alain BUFERNE <alb...@gm...> >>> wrote: >>> >>> By using HtmlUnit, you generally just program what a normal human being >>> will do to use the webSite. Since you just need information send by the >>> server in response of clickt this, select that, you don't need to execute >>> Js code . >>> >>> 2015-03-04 7:05 GMT+01:00 Rich Goldman <ri...@um...>: >>> >>> Doing a bit more digging, it seems the javascript functions for >>> populating the agenda items are in: >>> http://www.house.leg.state.mn.us/schedules/ScheduleElements0.js?v=1.12 >>> >>> I don't know enough javascript to know how to execute these functions >>> appropriately though. >>> -Rich >>> >>> On Wed, Mar 4, 2015 at 12:41 AM, Rich Goldman <ri...@um...> wrote: >>> >>> I'm trying to get the schedule information posted at: >>> >>> http://www.house.leg.state.mn.us/schedules/schedule.aspx#03/06/2015 >>> >>> The content is loaded dynamically (presumably via AJAX) and I've tried >>> the following code: >>> >>> >>> final WebClient webClient = new >>> WebClient(BrowserVersion.CHROME); >>> webClient.waitForBackgroundJavaScript(10000); >>> final HtmlPage page = webClient >>> .getPage(" >>> http://www.house.leg.state.mn.us/schedules/schedule.aspx#03/06/2015"); >>> String javaScriptCode = "SchedJSx.Init();"; >>> >>> ScriptResult result = page.executeJavaScript(javaScriptCode); >>> result.getJavaScriptResult(); >>> System.out.println("result: " + result.getJavaScriptResult()); >>> >>> I can get some of the dynamic content: >>> Friday, March 06, 2015 >>> 10:30 AM >>> Health and Human Services Reform >>> Chair: Rep. Tara Mack >>> Location: Basement State Office Building >>> Note: >>> ***Additional bills may be added >>> >>> but not the agenda/bill list. >>> >>> I feel like I'm missing something simple that I'm now aware of as a >>> newbie. I would appreciate a skilled HTML Unit user looking at the source >>> code of the source website and pointing out what I'm missing so I can >>> extract the agenda for this meeting as well. >>> >>> Thanks for any help you can provide. >>> -Rich >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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-08-11 09:58:25
|
Hi Clinton, Debugging in Chrome doesn't help, because it is needed to also see how HtmlUnit behaves. Please read the full page of [1] for future issues. The reported issue is because 'arguments[0]' was 'undefined' in HtmlUnit, but not in real browsers. This is now fixed in SVN, you can get latest snapshot form [2] once a successful build is made. Thanks,Ahmed [1] http://htmlunit.sourceforge.net/submittingJSBugs.html[2] https://ci.canoo.com/teamcity/viewLog.html?buildTypeId=HtmlUnit_FastBuild&buildId=lastSuccessful&tab=artifacts From: "Parham, Clinton" <cp...@bi...> To: Ahmed Ashour <asa...@ya...>; "htm...@li..." <htm...@li...> Sent: Saturday, August 8, 2015 3:46 AM Subject: Re: [Htmlunit-user] RichFaces 4 fileUpload #yiv0880478526 #yiv0880478526 -- _filtered #yiv0880478526 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv0880478526 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv0880478526 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv0880478526 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv0880478526 {font-family:HelveticaNeue;}#yiv0880478526 #yiv0880478526 p.yiv0880478526MsoNormal, #yiv0880478526 li.yiv0880478526MsoNormal, #yiv0880478526 div.yiv0880478526MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv0880478526 a:link, #yiv0880478526 span.yiv0880478526MsoHyperlink {color:blue;text-decoration:underline;}#yiv0880478526 a:visited, #yiv0880478526 span.yiv0880478526MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv0880478526 p.yiv0880478526MsoAcetate, #yiv0880478526 li.yiv0880478526MsoAcetate, #yiv0880478526 div.yiv0880478526MsoAcetate {margin:0in;margin-bottom:.0001pt;font-size:8.0pt;}#yiv0880478526 p.yiv0880478526msonormal, #yiv0880478526 li.yiv0880478526msonormal, #yiv0880478526 div.yiv0880478526msonormal {margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv0880478526 span.yiv0880478526msohyperlink {}#yiv0880478526 span.yiv0880478526msohyperlinkfollowed {}#yiv0880478526 span.yiv0880478526emailstyle17 {}#yiv0880478526 p.yiv0880478526msonormal1, #yiv0880478526 li.yiv0880478526msonormal1, #yiv0880478526 div.yiv0880478526msonormal1 {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;}#yiv0880478526 span.yiv0880478526msohyperlink1 {color:blue;text-decoration:underline;}#yiv0880478526 span.yiv0880478526msohyperlinkfollowed1 {color:purple;text-decoration:underline;}#yiv0880478526 span.yiv0880478526emailstyle171 {color:windowtext;}#yiv0880478526 span.yiv0880478526BalloonTextChar {}#yiv0880478526 span.yiv0880478526EmailStyle27 {color:#1F497D;}#yiv0880478526 .yiv0880478526MsoChpDefault {font-size:10.0pt;} _filtered #yiv0880478526 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv0880478526 div.yiv0880478526WordSection1 {}#yiv0880478526 Hi Ahmed, Debugging the code, I have a call stack that is only two levels deep. I’ve taken browser screenshots of the code at fileupload.js#403 (where HTMLUnit says “e” is undefined) and another screenshot of the code calling fileupload from jquery.js#547. The jquery code passes “arguments” as the parameter to fileupload.js. So I’m assuming that “arguments” is for some reason undefined when running HTMLUnit test. Why, I don’t know. Can you suggest something? Thank you. From: Ahmed Ashour [mailto:asa...@ya...] Sent: Thursday, August 06, 2015 6:36 PM To: htm...@li... Subject: Re: [Htmlunit-user] RichFaces 4 fileUpload Hi, You can use "alert(arguments.callee.caller);" Please read some hints in http://htmlunit.sourceforge.net/submittingJSBugs.html#JavaScript_hints Ahmed |
From: Scott B. <sco...@gm...> - 2015-08-10 16:56:25
|
Hi Everyone, I've been testing HtmlUnit with a few sites; in all these sites,they have elements such as a radio button or checkbox that when you click, then your profile on that site is updated; you don't need to submit a form or anything. But when I take the exact same actions with HtmlUnit, my profile on the server is not really updated. Do I have to do something special such as synchronizing the local copy of the page that HtmlUnit has with the server so that the server sees the change? As an example, I have added my code for switching my resume on indeed.com from private/public and vice versa. When I visit the page on a browser, all I have to do is click one of the two radio buttons to make the resume public/private; but when I do the same on HtmlUnit, and then go and visit the page on a browser, I can see that the information on the server hasn't really been changed. I've included my code below. Note that I have another method which logs in to indeed.com, and I know that I login correctly. Given this is happening with my sites for me, I thought maybe there is something like synchronizing with the server that I'm not doing. ================================= public void update() { // First, declare any element name or xapth that you are going to use. String xpathOfIsPublicRadioButton = "//input[@id='privacy_show']"; String xpathOfIsPrivateRadioButton = "//input[@id='privacy_hide']"; // Get the first page try { final HtmlPage resumePage = (HtmlPage) webclient.getPage( https://my.indeed.com/resume); CrawlerUtility.savePage(resumePage, "resumePage"); final HtmlRadioButtonInput makePublicRadioButton = (HtmlRadioButtonInput) resumePage.getFirstByXPath(xpathOfIsPublicRadioButton); final HtmlRadioButtonInput makePrivateRadioButton = (HtmlRadioButtonInput) resumePage.getFirstByXPath(xpathOfIsPrivateRadioButton); Page result = null; if (isProfilePublic()) { result = makePrivateRadioButton.click(); System.out.println("The Profile is changed to private now."); Thread.sleep(60000); } else { result = makePublicRadioButton.click(); System.out.println("The Profile is changed to public now."); Thread.sleep(60000); } } catch (Throwable e) { e.printStackTrace(); }//End of try/catch block. }//End of update(). |
From: Parham, C. <cp...@bi...> - 2015-08-08 01:46:41
|
Hi Ahmed, Debugging the code, I have a call stack that is only two levels deep. I’ve taken browser screenshots of the code at fileupload.js#403 (where HTMLUnit says “e” is undefined) and another screenshot of the code calling fileupload from jquery.js#547. The jquery code passes “arguments” as the parameter to fileupload.js. So I’m assuming that “arguments” is for some reason undefined when running HTMLUnit test. Why, I don’t know. Can you suggest something? Thank you. [cid:image001.png@01D0D15A.671007B0] [cid:image002.png@01D0D15A.671007B0] From: Ahmed Ashour [mailto:asa...@ya...] Sent: Thursday, August 06, 2015 6:36 PM To: htm...@li... Subject: Re: [Htmlunit-user] RichFaces 4 fileUpload Hi, You can use "alert(arguments.callee.caller);" Please read some hints in http://htmlunit.sourceforge.net/submittingJSBugs.html#JavaScript_hints Ahmed ________________________________ From: "Parham, Clinton" <cp...@bi...<mailto:cp...@bi...>> To: "htm...@li...<mailto:htm...@li...>" <htm...@li...<mailto:htm...@li...>> Sent: Thursday, August 6, 2015 10:41 PM Subject: [Htmlunit-user] RichFaces 4 fileUpload [Boxbe]<https://www.boxbe.com/overview>[http://www.boxbe.com/stfopen?tc_serial=22212599162&tc_rand=861515138&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001]This message is eligible for Automatic Cleanup! (cp...@bi...<mailto:cp...@bi...>) Add cleanup rule<https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Ftoken%3DIi8%252Bnk7qFall%252FMp1olc8mcL75eB22CTSOdEWLX%252F%252FOUWTlbWYsL0PJc7Riu6FXd37Sgx4PpTi8UqREKNrbwunkj6KPoZym5Nl14m%252BETSxLFUc%252BfKFMFPbKHMTQb8Viuqrs2Zl1nL2D8mSI20ANfPxtw%253D%253D%26key%3DV8qrOxzB48Po5biHytbO8smpjSAQyzonFfA97xlaZs8%253D&tc_serial=22212599162&tc_rand=861515138&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001> | More info<http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc_serial=22212599162&tc_rand=861515138&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001> Hello, I continue to struggle to get the RichFaces fileUpload component to work with HTMLUnit 2.18. (http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=fileUpload&skin=blueSky) After setting the file to upload with htmlInput.setValueAttribute and clicking the Upload button, I get this error from HTMLUnit: 2015-08-06 15:23:58,744 INFO main [com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine][handleJavaScriptException] Caught script exception ======= EXCEPTION START ======== EcmaError: lineNumber=[403] column=[0] lineSource=[null] name=[TypeError] sourceName=[https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js] message=[TypeError: Cannot read property "target" from undefined (https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js#403)] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "target" from undefined (https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js#403) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:865) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628) … == CALLING JAVASCRIPT == function () { return fn.apply(context || this, args.concat(slice.call(arguments))); } ======= EXCEPTION END ======== I’ve tried debugging and all that I can tell is that “e” is undefined on this line #403 in fileupload.js: switch (e.target.status) { The function in fileupload.js is called from jquery.js but I cannot trace the argument to better understand why it’s undefined when HTMLUnit is running. I’ve attached a testcase. Any suggestions? Thanks, Clint ________________________________ The contents contained herein may contain confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or action taken on the contents is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete this message. ------------------------------------------------------------------------------ _______________________________________________ Htmlunit-user mailing list Htm...@li...<mailto:Htm...@li...> https://lists.sourceforge.net/lists/listinfo/htmlunit-user ________________________________ The contents contained herein may contain confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or action taken on the contents is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete this message. |
From: Vasudevan C. <vco...@gm...> - 2015-08-07 13:24:38
|
Hi Ahmed, Thanks for your reply. The JS that I receive from google recaptcha service is generating one value and I need that value. The JS uses only window.atob, window.btoa methods. If I use a java base64 encode/decode functions and remove the reference to window object, will I be able to use JDK embedded Rhino Engine and get the same value without using window object? Your suggestion is very much appreciated. or Am I doing something which is not worth doing? Regards Vasu On 6 August 2015 at 17:11, Ahmed Ashour <asa...@ya...> wrote: > Hi Vasu, > > You can't use HtmlUnit to get ScriptObject and then pass it to Rhino > Engine, the two JS engines are in different java packages. > > If you have an issue with HtmlUnit JS engine, then please post a test case. > > Ahmed > ------------------------------ > *From:* Vasudevan Comandur <vco...@gm...> > *To:* "htm...@li..." < > htm...@li...> > *Sent:* Wednesday, August 5, 2015 6:59 PM > *Subject:* [Htmlunit-user] How to allow window.atob and window.btoa > methodexecution in HTML Unit from JS > > > Hi All, > > I am using the default JS engine that is bundled with JDK 1.6 (Rhino > Engine). > > I have been trying to use the methods supported by javax.script.* > classes to > execute the javascript methods. One of the javascript files use > window.atob and > window.btoa functions and that was throwing exception since window > object was > undefined. > > I used HTMLUnit to instantiate a webClient and followed by > getScriptObject to > get the Window object. This window object was passed to JS using > engine.put > method. > > I was not getting the expected results after window.atob call in JS. I > also > tried printing the window object using window.toString(). I saw the > signature > of the atob method but the not code inside the method. > > What should I do in JS so that window.atob function defined in HTMLUnit > under > WIndow class gets executed correctly. > > Looking forward to your help and suggestions to solve this problem. > > > Regards > Vasu > > PS: I am not using the JS engine bundled with HTMLUnit. > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |
From: Ahmed A. <asa...@ya...> - 2015-08-06 22:39:17
|
Hi, You can use "alert(arguments.callee.caller);" Please read some hints in http://htmlunit.sourceforge.net/submittingJSBugs.html#JavaScript_hints Ahmed From: "Parham, Clinton" <cp...@bi...> To: "htm...@li..." <htm...@li...> Sent: Thursday, August 6, 2015 10:41 PM Subject: [Htmlunit-user] RichFaces 4 fileUpload This message is eligible for Automatic Cleanup! (cp...@bi...) Add cleanup rule | More info <!--#yiv1812243964 _filtered #yiv1812243964 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv1812243964 #yiv1812243964 p.yiv1812243964MsoNormal, #yiv1812243964 li.yiv1812243964MsoNormal, #yiv1812243964 div.yiv1812243964MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";}#yiv1812243964 a:link, #yiv1812243964 span.yiv1812243964MsoHyperlink {color:blue;text-decoration:underline;}#yiv1812243964 a:visited, #yiv1812243964 span.yiv1812243964MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv1812243964 span.yiv1812243964EmailStyle17 {font-family:"Calibri", "sans-serif";color:windowtext;}#yiv1812243964 .yiv1812243964MsoChpDefault {} _filtered #yiv1812243964 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv1812243964 div.yiv1812243964WordSection1 {}-->Hello, I continue to struggle to get the RichFaces fileUpload component to work with HTMLUnit 2.18. (http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=fileUpload&skin=blueSky) After setting the file to upload with htmlInput.setValueAttribute and clicking the Upload button, I get this error from HTMLUnit: 2015-08-06 15:23:58,744 INFO main [com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine][handleJavaScriptException] Caught script exception ======= EXCEPTION START ======== EcmaError: lineNumber=[403] column=[0] lineSource=[null] name=[TypeError] sourceName=[https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js] message=[TypeError: Cannot read property "target" from undefined (https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js#403)] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "target" from undefined (https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js#403) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:865) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628) … == CALLING JAVASCRIPT == function () { return fn.apply(context || this, args.concat(slice.call(arguments))); } ======= EXCEPTION END ======== I’ve tried debugging and all that I can tell is that “e” is undefined on this line #403 in fileupload.js: switch (e.target.status) { The function in fileupload.js is called from jquery.js but I cannot trace the argument to better understand why it’s undefined when HTMLUnit is running. I’ve attached a testcase. Any suggestions? Thanks, Clint | The contents contained herein may contain confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or action taken on the contents is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete this message. | ------------------------------------------------------------------------------ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Parham, C. <cp...@bi...> - 2015-08-06 20:41:46
|
Hello, I continue to struggle to get the RichFaces fileUpload component to work with HTMLUnit 2.18. (http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=fileUpload&skin=blueSky) After setting the file to upload with htmlInput.setValueAttribute and clicking the Upload button, I get this error from HTMLUnit: 2015-08-06 15:23:58,744 INFO main [com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine][handleJavaScriptException] Caught script exception ======= EXCEPTION START ======== EcmaError: lineNumber=[403] column=[0] lineSource=[null] name=[TypeError] sourceName=[https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js] message=[TypeError: Cannot read property "target" from undefined (https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js#403)] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "target" from undefined (https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js#403) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:865) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628) ... == CALLING JAVASCRIPT == function () { return fn.apply(context || this, args.concat(slice.call(arguments))); } ======= EXCEPTION END ======== I've tried debugging and all that I can tell is that "e" is undefined on this line #403 in fileupload.js: switch (e.target.status) { The function in fileupload.js is called from jquery.js but I cannot trace the argument to better understand why it's undefined when HTMLUnit is running. I've attached a testcase. Any suggestions? Thanks, Clint ________________________________ The contents contained herein may contain confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or action taken on the contents is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete this message. |
From: Ronald B. <rb...@rb...> - 2015-08-06 20:20:00
|
>From a Quick look i fear the version property is not supported at the moment. Please open a issue, will try to fix it soon. RBRi On Thu, 6 Aug 2015 15:48:55 -0400 Teryl Taylor wrote: > >Hi guys, > >I'm playing around with different browsers and their plugins, and I've >noticed that Firefox and IE 11 seem to support a version variable for the >Plugin object. I'm creating plugins using the PluginConfiguration object >and don't see that variable. Is there another way I should be creating >plugins to gain access to that variable? Or is it just something that >isn't implemented? > >Best, > >Teryl > > > >----< Inline text [text-plain-04.txt] >------------------ > >------------------------------------------------------------------------------ > > > >----< Inline text [text-plain-05.txt] >------------------ > >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |
From: Teryl T. <ter...@gm...> - 2015-08-06 19:49:02
|
Hi guys, I'm playing around with different browsers and their plugins, and I've noticed that Firefox and IE 11 seem to support a version variable for the Plugin object. I'm creating plugins using the PluginConfiguration object and don't see that variable. Is there another way I should be creating plugins to gain access to that variable? Or is it just something that isn't implemented? Best, Teryl |
From: Ahmed A. <asa...@ya...> - 2015-08-06 11:43:52
|
Hi Vasu, You can't use HtmlUnit to get ScriptObject and then pass it to Rhino Engine, the two JS engines are in different java packages. If you have an issue with HtmlUnit JS engine, then please post a test case. Ahmed From: Vasudevan Comandur <vco...@gm...> To: "htm...@li..." <htm...@li...> Sent: Wednesday, August 5, 2015 6:59 PM Subject: [Htmlunit-user] How to allow window.atob and window.btoa methodexecution in HTML Unit from JS Hi All, I am using the default JS engine that is bundled with JDK 1.6 (Rhino Engine). I have been trying to use the methods supported by javax.script.* classes to execute the javascript methods. One of the javascript files use window.atob and window.btoa functions and that was throwing exception since window object was undefined. I used HTMLUnit to instantiate a webClient and followed by getScriptObject to get the Window object. This window object was passed to JS using engine.put method. I was not getting the expected results after window.atob call in JS. I also tried printing the window object using window.toString(). I saw the signature of the atob method but the not code inside the method. What should I do in JS so that window.atob function defined in HTMLUnit under WIndow class gets executed correctly. Looking forward to your help and suggestions to solve this problem. Regards Vasu PS: I am not using the JS engine bundled with HTMLUnit. |
From: Vasudevan C. <vco...@gm...> - 2015-08-05 16:59:17
|
Hi All, I am using the default JS engine that is bundled with JDK 1.6 (Rhino Engine). I have been trying to use the methods supported by javax.script.* classes to execute the javascript methods. One of the javascript files use window.atob and window.btoa functions and that was throwing exception since window object was undefined. I used HTMLUnit to instantiate a webClient and followed by getScriptObject to get the Window object. This window object was passed to JS using engine.put method. I was not getting the expected results after window.atob call in JS. I also tried printing the window object using window.toString(). I saw the signature of the atob method but the not code inside the method. What should I do in JS so that window.atob function defined in HTMLUnit under WIndow class gets executed correctly. Looking forward to your help and suggestions to solve this problem. Regards Vasu PS: I am not using the JS engine bundled with HTMLUnit. |
From: gaurab.pradhan <mer...@gm...> - 2015-08-03 11:26:16
|
Dear Ahmed, Thanks for your reply. I am trying to parse a JavaScript and AJAX site. At first i need to login it and with same login session i have to parse more than 300 links and download required information in a loop. I have used htmlunit for this project and it was working fine for last 2 years and now i am facing the Out of memory exception. Currently i am using htmlunit 2.17. My case is following : public class Test { static WebClient client; static { LogFactory.getFactory().setAttribute("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); java.util.logging.Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(Level.OFF); java.util.logging.Logger.getLogger("org.apache.commons.httpclient").setLevel(Level.OFF); java.util.logging.Logger.getLogger("com.gargoylesoftware").setLevel(Level.OFF); client = new WebClient(BrowserVersion.FIREFOX_38); include(); // this method contains client.waitForBackgroundJavaScript(10000); etc etc } public boolean login() throws IOException, InterruptedException { HtmlPage page1 = client.getPage(loginUrl); Thread.sleep(5000); HtmlForm form = page1.getFirstByXPath("//form"); form.getInputByName("username").setValueAttribute("username"); form.getInputByName("password").setValueAttribute("passworf"); HtmlPage homePage = form.getInputByValue("login").click(); homePage = null; client.close(); return true; } public void parseData(String url) { try { while (flag) { HtmlPage homePage = client.getPage(url); for () { // some process and again i have to use same client to access sub links. } } } catch (Exception e) { e.printStackTrace(); } closeAll(); } } I found webClient is occupying more space. <http://htmlunit.10904.n7.nabble.com/file/n36833/abc.jpg> Thanks, Gaurab Pradhan -- View this message in context: http://htmlunit.10904.n7.nabble.com/OutOfMemoryError-Java-heap-space-tp36797p36833.html Sent from the HtmlUnit - General mailing list archive at Nabble.com. |
From: asashour <asa...@ya...> - 2015-08-01 20:21:45
|
Hi, Can you please provide your complete case? Ahmed -- View this message in context: http://htmlunit.10904.n7.nabble.com/OutOfMemoryError-Java-heap-space-tp36797p36825.html Sent from the HtmlUnit - General mailing list archive at Nabble.com. |
From: Ronald B. <rb...@rb...> - 2015-08-01 12:48:47
|
Finally the files are also uploaded to SF. Happy testing! The HtmlUnit team On Sun, 26 Jul 2015 20:58:37 +0200 (CES) Ronald Brill wrote: > >Dear all, > >the HtmlUnit team would like to announce the availability of version 2.18 > >The main enhancements are: > - IE11 and FF38 support is mature > - SvgPage is added, and supports events (e.g. click()) > - Improvement to .type(), with Keybaord helper > - Supporting clipboard copy/cut/paste > - Support PATCH Method for HTTP > - As always, many bug fixes > >Changes list can be found in http://htmlunit.sourceforge.net/changes-report.html#a2.18 > >Because of the SourceForge Infrastructure problems we can't upload the artifacts to the usual download location. As soon as SF is back in service we will made the files >available. Until than you can download the files from the usual maven repositories. > >Happy testing! > > The HtmlUnit team > > >------------------------------------------------------------------------------ >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |