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: Alexandru P. <the...@ez...> - 2005-05-31 09:17:30
|
#: on behalf of Alexandru Popescu :: 5/31/2005 12:04 PM :# > Hi! >=20 > I was trying to test one of my working project page > using HtmlUnit. The tricky part about this was > that the page under test uses DWR to fill in 3 > select-s: the 1st one triggered by the body onload, > and the other 2 by the preceding select onchange event. >=20 > It seems i have reached some problems (and I am not > sure which side is not working correctly), but > after some `hacking=B4 i've been able to pass over some > of the problems, ending by a message from DWR > stating that `if i understand the way my browser works > [...]=B4. >=20 > After some more invesigation it seems like DWR is not > reading the parameters (or maybe HtmlUnit is > not correctly transmitting them). >=20 > A more detailed comment about the patches i need to > apply is here: htmlunit and dwr [1] >=20 > Now my questions are: > 1/ is anybody successfully tested such a scenario? > 2/ can anybody put some light on the last problem? (or > on the previous one, in case i did something > wrong). >=20 > :alex |.::the_mindstorm::.| >=20 > ps: sorry for posting it to the ml too >=20 >=20 As a continuation to this (after some digging): 1/ DWR is generating a script that has a relative URL in the form: /servletContext/servlet/dwr/exec/DwrService.findITByUserID which results = in the following error from htmlunit: [213ms][ERROR][com.gargoylesoftware.htmlunit.javascript.host.XMLHttpReque= st] - <Unable to initialize XMLHttpRequest using malformed URL '/ezreport/servlet/dwr/exec/DwrService= .findITByUserID'.> I've been able to patch this but on the DWR side and I think this is not = quite correct. However the next problem seems more important: 2/ the above function has to receive a set of parameters from the POST me= thod. XMLHttpRequest is setting in the WebRequestSettings.setRequestBody() with= the following arg: =09 c0-scriptName=3DDwrService callCount=3D1 c0-param0=3Dstring:7 c0-id=3D8360_1117530060338 c0-methodName=3DfindITByUserID xml=3Dtrue (i think these are correct at least from the pov of DWR), but later WebResponse webResponse=3D makeWebResponseForJavaScriptUrl(webWindow, Web= RequestSettings.getURL()) so it seems it is missing all the body. I guess that if i will be able to include the above content than it shoul= d work. What is your impression? i would really like to find out what the experts of htmlunit think about = the aboves. tia, :alex |.::the_mindstorm::.| |
From: Alexandru P. <the...@ez...> - 2005-05-31 09:06:51
|
Hi! I was trying to test one of my working project page using HtmlUnit. The tricky part about this was that the page under test uses DWR to fill in 3 select-s: the 1st one triggered by the body onload, and the other 2 by the preceding select onchange event. It seems i have reached some problems (and I am not sure which side is not working correctly), but after some `hacking=B4 i've been able to pass over some of the problems, ending by a message from DWR stating that `if i understand the way my browser works [...]=B4. After some more invesigation it seems like DWR is not reading the parameters (or maybe HtmlUnit is not correctly transmitting them). A more detailed comment about the patches i need to apply is here: htmlunit and dwr [1] Now my questions are: 1/ is anybody successfully tested such a scenario? 2/ can anybody put some light on the last problem? (or on the previous one, in case i did something wrong). :alex |.::the_mindstorm::.| ps: sorry for posting it to the ml too |
From: Marc G. <mgu...@ya...> - 2005-05-30 08:13:08
|
Hi, in the first case, I can imagine that the url is not correctly resolved (what would explain the long time before the exeception). I can't say more without stacktrace and example of the failing code. In the second case, it looks like a classpath issue. Are your sure to use the lib provided with htmlunit and only these libs? Marc. SALL Ousmane wrote: > Hi there > Currently i'am working with html unit on local page in > order to handle javascript redirection. > It's seems to work well, but i have 2 cases that > generate exception: > I load my local page like this: > ----------------- > WebClient client = new > WebClient(BrowserVersion.MOZILLA_1_0); > MockWebConnection cnx = new MockWebConnection(client); > > cnx.setDefaultResponse(st); > client.setWebConnection(cnx); > > HtmlPage page = (HtmlPage) client.getPage(new > URL(url)); > ----------------- > > > And when i have some direct redirection in javascript > source, like: > > ---------------- > <SCRIPT language="javascript"> > window.open('misc/popup/popup_head.htm','','height=360,width=550'); > </SCRIPT> > <HTML> > <HEAD> > ---------------- > > my application generate an exception, after a long > time of exectution > (maybe stackoverflow or time out ?) > > > And when i have some javascript include by javascript, > like: > ---------------- > > <SCRIPT language="JavaScript"> > <!-- > document.write("<script language='JavaScript' > src='lib-load.js'></scr"+"ipt>") > //--> > </SCRIPT> > ---------------- > > the generated exception is: > > java.lang.NoSuchMethodError: > org.apache.commons.httpclient.util.EncodingUtil.getString([BIILjava/lang/StringLjava/lang/String; > at > com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:842) > > So, maybe it can be possible to pre-parse javascript > code in order to find that > document.write will make a javascript inclusion? > > thank in advance for any help! > > > > > > > _____________________________________________________________________________ > Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos ! > Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: SALL O. <osa...@ya...> - 2005-05-30 07:36:09
|
Hi there Currently i'am working with html unit on local page in order to handle javascript redirection. It's seems to work well, but i have 2 cases that generate exception: I load my local page like this: ----------------- WebClient client = new WebClient(BrowserVersion.MOZILLA_1_0); MockWebConnection cnx = new MockWebConnection(client); cnx.setDefaultResponse(st); client.setWebConnection(cnx); HtmlPage page = (HtmlPage) client.getPage(new URL(url)); ----------------- And when i have some direct redirection in javascript source, like: ---------------- <SCRIPT language="javascript"> window.open('misc/popup/popup_head.htm','','height=360,width=550'); </SCRIPT> <HTML> <HEAD> ---------------- my application generate an exception, after a long time of exectution (maybe stackoverflow or time out ?) And when i have some javascript include by javascript, like: ---------------- <SCRIPT language="JavaScript"> <!-- document.write("<script language='JavaScript' src='lib-load.js'></scr"+"ipt>") //--> </SCRIPT> ---------------- the generated exception is: java.lang.NoSuchMethodError: org.apache.commons.httpclient.util.EncodingUtil.getString([BIILjava/lang/StringLjava/lang/String; at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:842) So, maybe it can be possible to pre-parse javascript code in order to find that document.write will make a javascript inclusion? thank in advance for any help! _____________________________________________________________________________ Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com |
From: Vinay M. <vin...@gm...> - 2005-05-28 16:56:40
|
HtmlForm's getParameterListForSubmit will give you a list of key-value(com.gargoylesoftware.htmlunit.KeyValuePair) pairs that you can use to see the values as they go to your server. You could do this before you submit the form. - Vinay On 5/28/05, htm...@li... <htm...@li...> wrote: > Send Htmlunit-user mailing list submissions to > htm...@li... >=20 > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > or, via email, send a message with subject or body 'help' to > htm...@li... >=20 > You can reach the person managing the list at > htm...@li... >=20 > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Htmlunit-user digest..." >=20 >=20 > Today's Topics: >=20 > 1. fake Submit of a form (a pinkelefant) >=20 > --__--__-- >=20 > Message: 1 > Date: Fri, 27 May 2005 16:34:47 -0400 > From: a pinkelefant <api...@gm...> > To: htm...@li... > Subject: [Htmlunit-user] fake Submit of a form > Reply-To: htm...@li... >=20 > Hi all , >=20 > I am using the latest 1.6 version of HtmlUnit. > Is there a way to "fake" submit a form ?=3D20 > I have a HtmlForm and I have populated all the fields with some values=3D= 20 > ( checkboxes,textareas,selects etc ) . Before I submit the form to the > actual server I want to verify if the right values have been enterted > in the right fields. >=20 > Is there a way i can see this completed form ?? I did a form.asXml() > but that did not > print out the filled in values. Can I fake Submit this and see the values= ? >=20 > thanks > Pat >=20 >=20 >=20 > --__--__-- >=20 > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user >=20 >=20 > End of Htmlunit-user Digest > |
From: a p. <api...@gm...> - 2005-05-27 20:34:50
|
Hi all , I am using the latest 1.6 version of HtmlUnit. Is there a way to "fake" submit a form ?=20 I have a HtmlForm and I have populated all the fields with some values=20 ( checkboxes,textareas,selects etc ) . Before I submit the form to the actual server I want to verify if the right values have been enterted in the right fields. Is there a way i can see this completed form ?? I did a form.asXml() but that did not print out the filled in values. Can I fake Submit this and see the values ? thanks Pat |
From: David D. K. <ddk...@ki...> - 2005-05-24 13:34:21
|
First, I'll assume that you're switching back to a "real" browser (Netscape/Mozilla) rather than using HtmlUnit because of the memory errors. The user profiles in Netscape/Mozilla have absolutely nothing to do with HtmlUnit. If you want to hit the same web site and log in multiple times on the same PC, you'll need to use different browsers, such as: Mozilla Suite, Firefox, Opera, MSIE 6, and Netscape (which just released version 8). Each of these, running as a different executable, should allow you to log in as five different users into your web application. (I suppose you could also set up multiple proxy servers with different hostnames so that you could log into one application multiple times with a single browser, too.) How much memory does your PC have? At work, we give all of the developers 1 GB so that they can run Tomcat (or JBoss), the IntelliJ IDEA, a Fitnesse server, multiple web browsers and the application they're working on all at the same time (as well as Windows apps like Outlook). Did you try to determine why you're running out of memory in your tests? Have you tried modifying the max size of the JVM heap when running the tests (-Xmx=256m)? We found we had to do that when running our hundreds or HtmlUnit-based tests within IntelliJ IDEA 4.5 or it would run out of memory. Finally, what version of HtmlUnit are you using? Before 1.3 (or 1.4?), there was a bug where memory would be consumed and not released until the test process exited. (This was the primary reason we had to increase the heap size to 256MB, if I remember correctly.) Dave On May 23, 2005, at 4:55 PM, Dantes, Ed wrote: > Hi, > I was just wondering if there was a field where you can specify > which the particular UserProfile box that comes up, when you use > Netscape and Mozilla. There probably isnt a way to do this, but > perhaps I should rephrase this another way. > > I am trying to load test my javascript application using HtmlUnit, > JUnit and JUnitPerf. The web application requires you to login > correctly prior to gaining access. Thus I have several users in > tow: testuser1, testuser2, etc... all of which I am trying to > emulate simultaneously. Basically each user has its own TestClass > in which I add all the tests to the TestSuite. One or two users, > work fine, but testing more users gives major problems, out of > memory error to be exact. This all leads back to the UserProfile, > because netscape will not allow you to log on as a different user > after two...any responses on how I can do this? > > Thanks > Ed > |
From: Dantes, E. <Ed....@gd...> - 2005-05-23 21:59:56
|
Hi, I was just wondering if there was a field where you can specify which the particular UserProfile box that comes up, when you use Netscape and Mozilla. There probably isnt a way to do this, but perhaps I should rephrase this another way. I am trying to load test my javascript application using HtmlUnit, JUnit and JUnitPerf. The web application requires you to login correctly prior to gaining access. Thus I have several users in tow: testuser1, testuser2, etc... all of which I am trying to emulate simultaneously. Basically each user has its own TestClass in which I add all the tests to the TestSuite. One or two users, work fine, but testing more users gives major problems, out of memory error to be exact. This all leads back to the UserProfile, because netscape will not allow you to log on as a different user after two...any responses on how I can do this? Thanks Ed |
From: David D. K. <ddk...@ki...> - 2005-05-18 03:39:01
|
Yes, HtmlUnit supports file upload forms. You do it by loading the web page through HtmlUnit, getting a reference to the object that represents the INPUT element of type="file", setting that object with a path to a known file, then getting a reference to the form (or the form's submit button), then submitting the form (calling the click() method on the button object). Dave On May 17, 2005, at 9:19 PM, Karl Stenerud wrote: > Here's a newbie question for you: > > Does HtmlUnit support file upload, and if so, how would I do it? |
From: Karl S. <ka...@we...> - 2005-05-18 02:17:00
|
Here's a newbie question for you: Does HtmlUnit support file upload, and if so, how would I do it? |
From: David D. K. <ddk...@ki...> - 2005-05-17 03:27:33
|
No. The WebClient mimics a browser's behavior. It does not connect to it or act like a remote control for it. Dave On May 16, 2005, at 3:50 PM, Dantes, Ed wrote: > Hi, > Im simply trying to access a remote browser on someone else's > desktop, but when I use say WebClient wc = new WebClient > (BrowserVersion.FULL_FEATURED > > _BROWSER, "http:<remote address>", <port number>); it gives me an > unknown host exeception, am I using this right? > > Thanks > Ed > |
From: Dantes, E. <Ed....@gd...> - 2005-05-16 22:32:40
|
Hi, Im simply trying to access a remote browser on someone else's desktop, but when I use say WebClient wc =3D new WebClient(BrowserVersion.FULL_FEATURED _BROWSER, "http:<remote address>", <port number>); it gives me an unknown host exeception, am I using this right? Thanks Ed |
From: John T. <jo...@jd...> - 2005-05-13 17:33:06
|
on 5/13/05 9:36 AM, David D. Kilzer (ddk...@ki...) wrote: > However, this code should NOT throw an exception--calling focus() on an > INPUT field of type TEXT should work just fine. Looks like it might be > a bug in HtmlUnit (or Rhino). I would recommend filing a bug on > SourceForge for this issue. That's what I thought. I wanted to get a sense of whether this was a known problem (perhaps fixed in CVS) before filing a bug. I'll file the bug later today. > Having said that, if you wouldn't have gotten an exception loading that > web page, then you would have next gotten an AssertionError thrown for > the assertEquals() line since the title of the Craig's List page would > not have matched "htmlunit - Welcome to HtmlUnit". Yes, I know. I do TDD; I always start with a failing test. ;-> But thanks anyway. > Dave --johnt -- JD Tangney and Associates http://jdtangney.com +1-510-579-2800 |
From: <ddk...@ki...> - 2005-05-13 16:37:05
|
HtmlUnit is throwing an exception when it tries to run this JavaScript on the web page: window.onload=document.getElementById("PostingTitle").focus(); However, this code should NOT throw an exception--calling focus() on an INPUT field of type TEXT should work just fine. Looks like it might be a bug in HtmlUnit (or Rhino). I would recommend filing a bug on SourceForge for this issue. Having said that, if you wouldn't have gotten an exception loading that web page, then you would have next gotten an AssertionError thrown for the assertEquals() line since the title of the Craig's List page would not have matched "htmlunit - Welcome to HtmlUnit". Try a different URL to continue your testing. Dave On Fri, May 13, 2005 at 09:18:45AM -0700, John Tangney wrote: > Hi > > I just downloaded HTLMUnit and am trying the very first example in the > tutorial, like this: > > public class TestBug extends TestCase { > public void testHomePage() throws Exception { > final WebClient webClient = new WebClient(); > final URL url = new > URL("http://post.craigslist.org/sfo/R/res/eby/49"); > final HtmlPage page = (HtmlPage)webClient.getPage(url); > assertEquals( "htmlunit - Welcome to HtmlUnit", page.getTitleText() > ); > } > } > > but with a different URL: http://post.craigslist.org/sfo/R/res/eby/49 > > The example works with the original URL. > > I get an exception. Any hints? > Thx, > --johnt > > Testsuite: com.jdtangney.poster.TestBug > Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 10.552 sec > ------------- Standard Error ----------------- > May 13, 2005 9:13:34 AM org.apache.commons.httpclient.HttpMethodDirector > isRedirectNeeded > INFO: Redirect requested but followRedirects is disabled > ------------- ---------------- --------------- > > Testcase: testHomePage took 10.486 sec > Caused an ERROR > argument type mismatch > ======= EXCEPTION START ======== > Exception class=[com.gargoylesoftware.htmlunit.ScriptException] > com.gargoylesoftware.htmlunit.ScriptException: argument type mismatch > at > com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScript > Engine.java:293) > [...] > ======= EXCEPTION END ======== > == CALLING JAVASCRIPT == > window.onload=document.getElementById("PostingTitle").focus(); > ======= EXCEPTION END ======== > > > -- > JD Tangney and Associates > http://jdtangney.com > +1-510-579-2800 |
From: John T. <jo...@jd...> - 2005-05-13 16:18:52
|
Hi I just downloaded HTLMUnit and am trying the very first example in the tutorial, like this: public class TestBug extends TestCase { public void testHomePage() throws Exception { final WebClient webClient = new WebClient(); final URL url = new URL("http://post.craigslist.org/sfo/R/res/eby/49"); final HtmlPage page = (HtmlPage)webClient.getPage(url); assertEquals( "htmlunit - Welcome to HtmlUnit", page.getTitleText() ); } } but with a different URL: http://post.craigslist.org/sfo/R/res/eby/49 The example works with the original URL. I get an exception. Any hints? Thx, --johnt Testsuite: com.jdtangney.poster.TestBug Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 10.552 sec ------------- Standard Error ----------------- May 13, 2005 9:13:34 AM org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded INFO: Redirect requested but followRedirects is disabled ------------- ---------------- --------------- Testcase: testHomePage took 10.486 sec Caused an ERROR argument type mismatch ======= EXCEPTION START ======== Exception class=[com.gargoylesoftware.htmlunit.ScriptException] com.gargoylesoftware.htmlunit.ScriptException: argument type mismatch at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScript Engine.java:293) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(Html Page.java:722) at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScri pt.java:209) at com.gargoylesoftware.htmlunit.html.HtmlScript.appendChild(HtmlScript.java:16 8) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.handleChara cters(HTMLParser.java:411) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement( HTMLParser.java:377) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:249) at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:3 61) at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1015) at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:888) at org.cyberneko.html.HTMLScanner$SpecialScanner.scan(HTMLScanner.java:2767) at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:789) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:478) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:431) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLP arser.java:330) at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageC reator.java:115) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreat or.java:84) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:7 09) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:376) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) at com.jdtangney.poster.TestBug.testHomePage(TestBug.java:18) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) Enclosed exception: ======= EXCEPTION START ======== Exception class=[java.lang.IllegalArgumentException] com.gargoylesoftware.htmlunit.ScriptException: argument type mismatch at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.put(SimpleScriptab le.java:344) at org.mozilla.javascript.ScriptableObject.putProperty(ScriptableObject.java:13 47) at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1430) at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1420) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2753) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140 ) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:304) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2769) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2145) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140 ) at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:149 ) at org.mozilla.javascript.Context.evaluateString(Context.java:1220) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScript Engine.java:288) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(Html Page.java:722) at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScri pt.java:209) at com.gargoylesoftware.htmlunit.html.HtmlScript.appendChild(HtmlScript.java:16 8) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.handleChara cters(HTMLParser.java:411) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement( HTMLParser.java:377) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:249) at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:3 61) at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1015) at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:888) at org.cyberneko.html.HTMLScanner$SpecialScanner.scan(HTMLScanner.java:2767) at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:789) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:478) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:431) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLP arser.java:330) at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageC reator.java:115) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreat or.java:84) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:7 09) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:376) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) at com.jdtangney.poster.TestBug.testHomePage(TestBug.java:18) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) Enclosed exception: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.put(SimpleScriptab le.java:336) at org.mozilla.javascript.ScriptableObject.putProperty(ScriptableObject.java:13 47) at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1430) at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1420) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2753) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140 ) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:304) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2769) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2145) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140 ) at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:149 ) at org.mozilla.javascript.Context.evaluateString(Context.java:1220) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScript Engine.java:288) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(Html Page.java:722) at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScri pt.java:209) at com.gargoylesoftware.htmlunit.html.HtmlScript.appendChild(HtmlScript.java:16 8) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.handleChara cters(HTMLParser.java:411) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement( HTMLParser.java:377) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:249) at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:3 61) at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1015) at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:888) at org.cyberneko.html.HTMLScanner$SpecialScanner.scan(HTMLScanner.java:2767) at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:789) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:478) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:431) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLP arser.java:330) at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageC reator.java:115) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreat or.java:84) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:7 09) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:376) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) at com.jdtangney.poster.TestBug.testHomePage(TestBug.java:18) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) ======= EXCEPTION END ======== == CALLING JAVASCRIPT == window.onload=document.getElementById("PostingTitle").focus(); ======= EXCEPTION END ======== -- JD Tangney and Associates http://jdtangney.com +1-510-579-2800 |
From: Mike B. <mb...@Ga...> - 2005-05-11 11:10:04
|
Gael Harbonnier wrote: > Ok I started to study the source code but I noticed that the html is > well parsed when I call > > WebResponse rep = webClient.getWebConnection().getResponse(new > WebRequestSettings(url)); > System.out.println(rep.getContentAsString()); I've never seen NekoHTML fail to parse legal html. The only time I've seen it get confused is when the html is really badly formed. What you get from asXml() is the DOM tree after NekoHTML has parsed it. If the elements you want aren't there then NekoHTML stripped them out. If you believe that the html is correct and that NekoHTML has a bug then either post some html samples here or send them to the author of NekoHTML - http://people.apache.org/~andyc/neko/doc/html/ An easy way to see if your html is legal is to run it through the W3C validator - http://validator.w3.org/ If NekoHtml can't parse the html then I'd almost guarentee that it won't pass the validator either. Hope this helps. -- Mike Bowler President, Gargoyle Software Inc. Website: http://www.GargoyleSoftware.com Weblog : http://www.SphericalImprovement.com/blogs/mbowler/ |
From: Gael H. <gae...@ho...> - 2005-05-11 10:58:23
|
Ok I started to study the source code but I noticed that the html is well parsed when I call WebResponse rep = webClient.getWebConnection().getResponse(new WebRequestSettings(url)); System.out.println(rep.getContentAsString()); but when I want to click on my button the input isn't find and if I want to display a Xml representation of the form with asXml method, the code is incorrect. HtmlForm form = (HtmlForm)pageCourrante.getForms().get(numeroFormulaire); System.out.println( form.asXml() ); HtmlInput bouton = (HtmlInput)form.getInputByValue(texteBouton); pageCourrante = (HtmlPage)((HtmlInput)bouton).click(); what about the getForms method ? Gael >From: Marc Guillemot <mgu...@ya...> >Reply-To: htm...@li... >To: htm...@li... >Subject: Re: [Htmlunit-user] Disable Tidy >Date: Wed, 11 May 2005 10:52:26 +0200 > >HtmlUnit uses NekoHtml to parse the received html in a well formed tree. It >is absolutely not possible to disable it: how could the html be parsed? >If you don't have the possibility to fix your incorrect html, you can >implement your own WebConnection to change the received html code before it >is parsed by htmlunit. > >Marc. > >Gael Harbonnier wrote: >>I believe HtmlUnit uses Tidy for cleaning Html pages, but is it possible >>to disable it ? >>Htmlunit doesn't succeed in finding a submint button because of the >>transformed web page. >>Tidy tranform this : >> >><form> >> <table> >> <table> >> <input ... > >> </table> >><form> >> >> </table> >> >>into this: >> >><form> >> <table> >> </table> >><form> >> >><table> >> <input ... > >> </table> >> >>and so HtmlUnit doesn't find the input in the form. >> >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by Oracle Space Sweepstakes >>Want to be the first software developer in space? >>Enter now for the Oracle Space Sweepstakes! >>http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click >>_______________________________________________ >>Htmlunit-user mailing list >>Htm...@li... >>https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by Oracle Space Sweepstakes >Want to be the first software developer in space? >Enter now for the Oracle Space Sweepstakes! >http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: Marc G. <mgu...@ya...> - 2005-05-11 08:50:21
|
HtmlUnit uses NekoHtml to parse the received html in a well formed tree. It is absolutely not possible to disable it: how could the html be parsed? If you don't have the possibility to fix your incorrect html, you can implement your own WebConnection to change the received html code before it is parsed by htmlunit. Marc. Gael Harbonnier wrote: > I believe HtmlUnit uses Tidy for cleaning Html pages, but is it possible > to disable it ? > Htmlunit doesn't succeed in finding a submint button because of the > transformed web page. > Tidy tranform this : > > <form> > <table> > <table> > <input ... > > </table> > <form> > > </table> > > into this: > > <form> > <table> > </table> > <form> > > <table> > <input ... > > </table> > > and so HtmlUnit doesn't find the input in the form. > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Gael H. <gae...@ho...> - 2005-05-11 07:39:13
|
I believe HtmlUnit uses Tidy for cleaning Html pages, but is it possible to disable it ? Htmlunit doesn't succeed in finding a submint button because of the transformed web page. Tidy tranform this : <form> <table> <table> <input ... > </table> <form> </table> into this: <form> <table> </table> <form> <table> <input ... > </table> and so HtmlUnit doesn't find the input in the form. |
From: Mike B. <mb...@Ga...> - 2005-05-11 01:19:44
|
Brad Clarke wrote: >If someone knows how to set the "source" and "target" attributes of >all the javac tasks under maven then we could make that change as well. > > That appears to have been done already. The following lines are in project.properties maven.compile.source=1.3 maven.compile.target=1.3 -- Mike Bowler President, Gargoyle Software Inc. Website: http://www.GargoyleSoftware.com Weblog : http://www.SphericalImprovement.com/blogs/mbowler/ |
From: Mike B. <mb...@Ga...> - 2005-05-11 01:00:45
|
HtmlUnit 1.6 has been released. Thanks to everyone who contributed to this release. The full change log is available at http://htmlunit.sourceforge.net/changes-report.html -- Mike Bowler President, Gargoyle Software Inc. Website: http://www.GargoyleSoftware.com Weblog : http://www.SphericalImprovement.com/blogs/mbowler/ |
From: Brad C. <yo...@br...> - 2005-05-10 18:32:43
|
I recently ran into this on another project. It comes from compiling the code on a later JDK than the one your running it on. I was compiling on JDK5 and attempting to run in a Tomcat instance running JDK 1.4.2 when I got this error. If you compile HtmlUnit using ant (which is unsupported but I use it) it will build for JDK 1.3 compatibility. If someone knows how to set the "source" and "target" attributes of all the javac tasks under maven then we could make that change as well. Brad C --- "Dantes, Ed" <Ed....@gd...> wrote: > Hello, > Im getting a Java.lang.Unsupported ClassVersionError > com/gargoylesoftware/htmlunit/WebClient(unsupported major.minor version > 47.0) when running my junit test, it comes up right away. I am using > the most recent CVS update availabe online and inserted this in my > classpath. Has anyone come across this error and if so, how did you > resolve? > > Thanks Again > Ed > |
From: Brad C. <yo...@br...> - 2005-05-10 18:28:16
|
Since I was editing the wiki anyway I posted my ConfirmHandler implementation here: http://htmlunit.sourceforge.net/phpwiki/index.php/ConfirmHandlerExample OK and Cancel are handled by returning true or false from handleConfirm. There is no dialog object, only the text of the confirm message and your choice of return value. Brad C --- Jeff Marendo <jma...@ho...> wrote: > After reading the information in the "How do I use JavaScript..." section, I > know I need to implement the ConfirmHandler interface to work with a confirm > dialog. I don't understand how to achieve two things, though: > > 1. When a confirm is triggered during the execution of a HtmlTest case, how > do I simulate the user input for what would be selected (that is, 'ok' or > 'cancel')? > 2. How would you capture that in the handleConfirm( final Page page, final > String message ) method? > > My guess is that there must be a way to access the dialog via the argument > page, but even so, I'm still not clear on it particularly when considering > question #1. > > This might be easy, but I'm just getting into using HtmlUnit so any help > would be appreciated. Thanks. > > Jeff > |
From: Dantes, E. <Ed....@gd...> - 2005-05-10 18:22:47
|
Hello, Im getting a Java.lang.Unsupported ClassVersionError com/gargoylesoftware/htmlunit/WebClient(unsupported major.minor version 47.0) when running my junit test, it comes up right away. I am using the most recent CVS update availabe online and inserted this in my classpath. Has anyone come across this error and if so, how did you resolve? Thanks Again Ed |
From: Jeff M. <jma...@ho...> - 2005-05-10 17:50:34
|
After reading the information in the "How do I use JavaScript..." section, I know I need to implement the ConfirmHandler interface to work with a confirm dialog. I don't understand how to achieve two things, though: 1. When a confirm is triggered during the execution of a HtmlTest case, how do I simulate the user input for what would be selected (that is, 'ok' or 'cancel')? 2. How would you capture that in the handleConfirm( final Page page, final String message ) method? My guess is that there must be a way to access the dialog via the argument page, but even so, I'm still not clear on it particularly when considering question #1. This might be easy, but I'm just getting into using HtmlUnit so any help would be appreciated. Thanks. Jeff |