From: Dave S. <dav...@ca...> - 2004-03-30 20:30:44
|
I saw this in the archives but no response so I guess I will ask it again. I am testing an application that uses struts with javascript field required checking when a form is submitted. When the user presses save it checks that all of the required fields and filled in and if not pops up an alert box with the fields that are required. I get the following back trace when running my test. [junit] Testcase: testAddWithoutData took 13.554 sec [junit] Caused an ERROR [junit] The undefined value has no properties. [junit] ======= EXCEPTION START ======== [junit] EcmaError: lineNumber=[123] column=[0] lineSource=[null] name=[ConversionError] sourceName=[/aci/images/static.js] message=[The undefined value has no properties.] errorObject=[ConversionError: The undefined value has no properties.] [junit] com.gargoylesoftware.htmlunit.ScriptException: The undefined value has no properties. [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:250) [junit] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:886) [junit] at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:138) [junit] at com.gargoylesoftware.htmlunit.html.HtmlInput.doClickAction(HtmlInput.java:165) [junit] at com.gargoylesoftware.htmlunit.html.HtmlInput.click(HtmlInput.java:142) [junit] at tests.aci.web.TestShipment.testAddWithoutData(UnknownSource) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [junit] Enclosed exception: [junit] ConversionError: The undefined value has no properties. (/aci/images/static.js; line 123) [junit] at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597) [junit] at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557) [junit] at org.mozilla.javascript.ScriptRuntime.getProp(ScriptRuntime.java:712) [junit] at org.mozilla.javascript.gen.c87.call(/aci/images/static.js:123) [junit] at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1191) [junit] at org.mozilla.javascript.gen.c113.call(Embeddedscript:9) [junit] at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1191) [junit] at org.mozilla.javascript.gen.c119.call(Wrapper definition for onSubmit:1) [junit] at org.mozilla.javascript.optimizer.OptRuntime.callSimple(OptRuntime.java:275) [junit] at org.mozilla.javascript.gen.c121.call(onSubmit:1) [junit] at org.mozilla.javascript.gen.c121.exec(onSubmit) [junit] at org.mozilla.javascript.Context.evaluateReader(Context.java:820) [junit] at org.mozilla.javascript.Context.evaluateString(Context.java:784) [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:242) [junit] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:886) [junit] at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:138) [junit] at com.gargoylesoftware.htmlunit.html.HtmlInput.doClickAction(HtmlInput.java:165) [junit] at com.gargoylesoftware.htmlunit.html.HtmlInput.click(HtmlInput.java:142) [junit] at tests.aci.web.TestShipment.testAddWithoutData(Unknown Source) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [junit] == CALLING JAVASCRIPT == [junit] GargoyleWrapper0() [junit] ======= EXCEPTION END ======== [junit] Testcase: testAddWithoutData [junit] TEST tests.aci.web.TestShipment FAILED -- Dave Smith CANdata Systems Ltd 416-493-9020 |
From: Avidan A. <av...@se...> - 2008-04-07 23:52:22
|
When I ran a class recently, I got this error and a huge stack trace: "CollectGarbage" is not defined. Any idea of how I can either fix that or suppress the error? |
From: Mike B. <mb...@Ga...> - 2004-03-30 21:08:03
|
Dave Smith wrote: > I saw this in the archives but no response so I guess I will ask it > again. I am testing an application that uses struts with javascript > field required checking when a form is submitted. When the user > presses save it checks that all of the required fields and filled in > and if not pops up an alert box with the fields that are required. I > get the following back trace when running my test. > > [junit] Testcase: testAddWithoutData took 13.554 sec > [junit] Caused an ERROR > [junit] The undefined value has no properties. > [junit] ======= EXCEPTION START ======== > [junit] EcmaError: lineNumber=[123] column=[0] lineSource=[null] > name=[ConversionError] sourceName=[/aci/images/static.js] message=[The > undefined value has no properties.] errorObject=[ConversionError: The > undefined value has no properties.] This is a fairly generic symptom that means "some javascript object that you're trying to use hasn't been implemented yet". The trick is to discover what javascript host object you're referencing so that we can implement it (or at least stub it out as a temporary fix). Can you share the javascript (and the HtmlUnit code you're using to hit it)? Even better, is this on a publicly available server that we could hit on remotely? -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Dave S. <dav...@ca...> - 2004-03-30 21:27:55
|
If I understand you then I'm going to guess it is Array or Function, but here is the offending code... Line 123 is the if (field.type == 'text' etc ... function required () { this.aa = new Array("consols.file_num", "House Bill Number is required.", new Function ("varName", " return this[varName];")); this.ab = new Array("consols.cargo_ctl_num", "Orginal Cargo Control Number is required.", new Function ("varName", " return this[varName];")); this.ac = new Array("consols.carrier_code", "Carrier Code is required.", new Function ("varName", " return this[varName];")); this.ad = new Array("invoice.data.country", "Destination Country is required.", new Function ("varName", " return this[varName];")); this.ae = new Array("invoice.data.city", "Destination City is required.", new Function ("varName", " return this[varName];")); this.af = new Array("invoice.data.port_name", "Entry Port is required.", new Function ("varName", " return this[varName];")); this.ag = new Array("invoice.consignee.nameAddr.name", "Consignee Name is required.", new Function ("varName", " return this[varName];")); this.ah = new Array("invoice.consignee.nameAddr.addr1", "Consignee Address is required.", new Function ("varName", " return this[varName];")); this.ai = new Array("invoice.consignee.nameAddr.city", "Consignee City is required.", new Function ("varName", " return this[varName];")); this.aj = new Array("invoice.consignee.nameAddr.prov", "Consignee Province is required.", new Function ("varName", " return this[varName];")); this.ak = new Array("invoice.consignee.nameAddr.postal_code", "Consignee Postal Code is required.", new Function ("varName", " return this[varName];")); this.al = new Array("invoice.consignee.nameAddr.country_id", "Consignee Country is required.", new Function ("varName", " return this[varName];")); this.am = new Array("invoice.consignor.nameAddr.name", "Consignor Name is required.", new Function ("varName", " return this[varName];")); this.an = new Array("invoice.consignor.nameAddr.addr1", "Consignor Address is required.", new Function ("varName", " return this[varName];")); this.ao = new Array("invoice.consignor.nameAddr.city", "Consignor City is required.", new Function ("varName", " return this[varName];")); this.ap = new Array("invoice.consignor.nameAddr.country_id", "Consignor Country is required.", new Function ("varName", " return this[varName];")); } function validateRequired(form) { var isValid = true; var focusField = null; var i = 0; var fields = new Array(); oRequired = new required(); for (x in oRequired) { var field = form[oRequired[x][0]]; if (field.type == 'text' || field.type == 'textarea' || field.type == 'file' || field.type == 'select-one' || field.type == 'radio' || field.type == 'password') { var value = ''; // get field's value if (field.type == "select-one") { var si = field.selectedIndex; if (si >= 0) { value = field.options[si].value; } } else { value = field.value; } if (trim(value).length == 0) { if (i == 0) { focusField = field; } fields[i++] = oRequired[x][1]; isValid = false; } } } if (fields.length > 0) { focusField.focus(); alert(fields.join('\n')); } return isValid; } On Tue, 2004-03-30 at 16:09, Mike Bowler wrote: > Dave Smith wrote: > > I saw this in the archives but no response so I guess I will ask it > > again. I am testing an application that uses struts with javascript > > field required checking when a form is submitted. When the user > > presses save it checks that all of the required fields and filled in > > and if not pops up an alert box with the fields that are required. I > > get the following back trace when running my test. > > > > [junit] Testcase: testAddWithoutData took 13.554 sec > > [junit] Caused an ERROR > > [junit] The undefined value has no properties. > > [junit] ======= EXCEPTION START ======== > > [junit] EcmaError: lineNumber=[123] column=[0] lineSource=[null] > > name=[ConversionError] sourceName=[/aci/images/static.js] message=[The > > undefined value has no properties.] errorObject=[ConversionError: The > > undefined value has no properties.] > > This is a fairly generic symptom that means "some javascript object that > you're trying to use hasn't been implemented yet". The trick is to > discover what javascript host object you're referencing so that we can > implement it (or at least stub it out as a temporary fix). > > Can you share the javascript (and the HtmlUnit code you're using to hit > it)? Even better, is this on a publicly available server that we could > hit on remotely? -- Dave Smith CANdata Systems Ltd 416-493-9020 |
From: Mike B. <mb...@Ga...> - 2004-03-30 21:51:08
|
Dave Smith wrote: > If I understand you then I'm going to guess it is Array or Function, but > here is the offending code... All the standard javascript functions are implemented by the Rhino engine so I'd guess that Array and Function aren't the problem. The parts that HtmlUnit needs to implement are the browser specific host objects like Form and Window and Frame. It might be the array indexing part of Form that is the problem. > var field = form[oRequired[x][0]]; It would appear that field is null so form[] is not returning the object you need. What is the value being passed into form[]? Does it match the name attribute of an object inside that form? Or is it an index? -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Dave S. <dav...@ca...> - 2004-03-30 22:09:41
|
It is attribute ie name of the input field. form is the HtmlForm object. So the first iteration should translate into like ... var field = form["consols.file_num"]; On Tue, 2004-03-30 at 16:52, Mike Bowler wrote: > Dave Smith wrote: > > > If I understand you then I'm going to guess it is Array or Function, but > > here is the offending code... > > All the standard javascript functions are implemented by the Rhino > engine so I'd guess that Array and Function aren't the problem. The > parts that HtmlUnit needs to implement are the browser specific host > objects like Form and Window and Frame. > > It might be the array indexing part of Form that is the problem. > > > var field = form[oRequired[x][0]]; > > It would appear that field is null so form[] is not returning the object > you need. What is the value being passed into form[]? Does it match > the name attribute of an object inside that form? Or is it an index? -- Dave Smith CANdata Systems Ltd 416-493-9020 |
From: Mike B. <mb...@Ga...> - 2004-03-30 22:38:57
|
The question I should have asked right off the bat is "what version of HtmlUnit are you using?". If you're using something older than 1.3pre1 then I'd recommend upgrading - there have been a lot of fixes put in since then. There are tests for form["somename"] that are working in the latest code so I'm wondering if you're stumbling across something that's already been fixed in cvs. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Dave S. <dav...@ca...> - 2004-03-31 03:59:03
|
Nope. I'm using the latest. I'll pull the latest out of CVS and recompile ... On Tue, 2004-03-30 at 17:40, Mike Bowler wrote: > The question I should have asked right off the bat is "what version of > HtmlUnit are you using?". If you're using something older than 1.3pre1 > then I'd recommend upgrading - there have been a lot of fixes put in > since then. > > There are tests for form["somename"] that are working in the latest code > so I'm wondering if you're stumbling across something that's already > been fixed in cvs. |
From: Alexei G. <al...@go...> - 2004-03-31 12:11:37
|
Hello Dave and Mike, I had to implement some methods for some host objects at the time of HtmlUnit 1.2.3, and I used to modify SimpleScriptable get(...) and put(...) methods to dump javascript execution step by step. I think this methods did not change with HtmlUnit 1.3, so you con probably use my code from patch '[ 852838 ] Couple of javascript features for HtmlUnit 1.2.3' for SimpleScriptable. This produces very comfortable step by step dump with a lot of information about how javasctipt is executed, and you will see the exception or 'null' returned somewhere in the dump, which is the reason for your JavascriptException. Detailed description (changes.html) is also in the patch. Have fun Alexei Dave Smith wrote: >Nope. I'm using the latest. I'll pull the latest out of CVS and >recompile ... >On Tue, 2004-03-30 at 17:40, Mike Bowler wrote: > > >>The question I should have asked right off the bat is "what version of >>HtmlUnit are you using?". If you're using something older than 1.3pre1 >>then I'd recommend upgrading - there have been a lot of fixes put in >>since then. >> >>There are tests for form["somename"] that are working in the latest code >>so I'm wondering if you're stumbling across something that's already >>been fixed in cvs. >> >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > |
From: Dave S. <dav...@ca...> - 2004-03-31 14:37:36
|
OK. I download last nights snapshot and it test just hangs. A thread dump is below. Also why is [junit] at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:575) [junit] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:535) [junit] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:453) [junit] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:325) [junit] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:954) [junit] at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:141) Repeated at least 20 times before the top of the dump below? There are 6 .js includes and one .css include but it does not match the number of occurrences of the loop. at java.lang.Throwable.getStackTraceElement(Native Method) [junit] at java.lang.Throwable.getOurStackTrace(Throwable.java:591) [junit] - locked <0x446808f8> (a java.lang.Throwable) [junit] at java.lang.Throwable.getStackTrace(Throwable.java:582) [junit] at org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:115) [junit] at org.apache.commons.logging.impl.Jdk14Logger.trace(Jdk14Logger.java:256) [junit] at org.apache.commons.httpclient.HeaderElement.parsePair(HeaderElement.java:407) [junit] at org.apache.commons.httpclient.HeaderElement.parse(HeaderElement.java:342) [junit] at org.apache.commons.httpclient.Header.getValues(Header.java:130) [junit] at org.apache.commons.httpclient.HttpMethodBase.readResponseBody(HttpMethodBase.java:2056) [junit] at org.apache.commons.httpclient.HttpMethodBase.readResponseBody(HttpMethodBase.java:2004) [junit] at org.apache.commons.httpclient.methods.GetMethod.readResponseBody(GetMethod.java:403) [junit] at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1962) [junit] at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2659) [junit] at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1093) [junit] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:675) [junit] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529) [junit] at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:150) [junit] at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1303) On Tue, 2004-03-30 at 17:40, Mike Bowler wrote: > The question I should have asked right off the bat is "what version of > HtmlUnit are you using?". If you're using something older than 1.3pre1 > then I'd recommend upgrading - there have been a lot of fixes put in > since then. > > There are tests for form["somename"] that are working in the latest code > so I'm wondering if you're stumbling across something that's already > been fixed in cvs. -- Dave Smith CANdata Systems Ltd 416-493-9020 |
From: Dave S. <dav...@ca...> - 2004-04-01 13:48:59
|
Damm.. I thought this was going somewhere .. Mike any ideas? On Wed, 2004-03-31 at 09:42, Dave Smith wrote: > OK. I download last nights snapshot and it test just hangs. A thread > dump is below. Also why is > [junit] at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:575) > [junit] at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:535) > [junit] at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:453) > [junit] at > com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:325) > [junit] at > com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:954) > [junit] at > com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:141) > > Repeated at least 20 times before the top of the dump below? There are 6 > .js includes and one .css include but it does not match the number of > occurrences of the loop. > > > at java.lang.Throwable.getStackTraceElement(Native Method) > [junit] at > java.lang.Throwable.getOurStackTrace(Throwable.java:591) > [junit] - locked <0x446808f8> (a java.lang.Throwable) > [junit] at java.lang.Throwable.getStackTrace(Throwable.java:582) > [junit] at > org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:115) > [junit] at > org.apache.commons.logging.impl.Jdk14Logger.trace(Jdk14Logger.java:256) > [junit] at > org.apache.commons.httpclient.HeaderElement.parsePair(HeaderElement.java:407) > [junit] at > org.apache.commons.httpclient.HeaderElement.parse(HeaderElement.java:342) > [junit] at > org.apache.commons.httpclient.Header.getValues(Header.java:130) > [junit] at > org.apache.commons.httpclient.HttpMethodBase.readResponseBody(HttpMethodBase.java:2056) > [junit] at > org.apache.commons.httpclient.HttpMethodBase.readResponseBody(HttpMethodBase.java:2004) > [junit] at > org.apache.commons.httpclient.methods.GetMethod.readResponseBody(GetMethod.java:403) > [junit] at > org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1962) > [junit] at > org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2659) > [junit] at > org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1093) > [junit] at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:675) > [junit] at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529) > [junit] at > com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:150) > [junit] at > com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1303) > > > On Tue, 2004-03-30 at 17:40, Mike Bowler wrote: > > The question I should have asked right off the bat is "what version of > > HtmlUnit are you using?". If you're using something older than 1.3pre1 > > then I'd recommend upgrading - there have been a lot of fixes put in > > since then. > > > > There are tests for form["somename"] that are working in the latest code > > so I'm wondering if you're stumbling across something that's already > > been fixed in cvs. -- Dave Smith CANdata Systems Ltd 416-493-9020 |
From: Mike B. <mb...@Ga...> - 2004-04-01 14:08:48
|
Dave Smith wrote: >>OK. I download last nights snapshot and it test just hangs. A thread >>dump is below. Also why is >>[junit] at >>com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:575) >> [junit] at >>com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:535) >> [junit] at >>com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:453) >> [junit] at >>com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:325) >> [junit] at >>com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:954) >> [junit] at >>com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:141) >> >>Repeated at least 20 times before the top of the dump below? There are 6 >>.js includes and one .css include but it does not match the number of >>occurrences of the loop. It would appear that a page refresh is being triggered every time the page gets loaded and that you're consequently in an infinite loop. Refresh can be triggered by javascript (onload handler) or a <meta> tag or a refresh header in the http response. I assume that this page loads fine in a browser btw. The first thing I'd try would be a breakpoint or print statement in HtmlPage.executeRefreshIfNeeded() to see what specifically has triggered the refresh each time. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Dave S. <dav...@ca...> - 2004-04-01 14:16:24
|
Well I can tell you there is a meta tag for refresh but it is 60 secs. It looks like this ... <meta HTTP-EQUIV="REFRESH" CONTENT="60;URL=https://192.168.1.2:8443/aci/FindShipmentAction.do"/> Looks like you are ignoring the time in seconds ... On Thu, 2004-04-01 at 09:08, Mike Bowler wrote: > Dave Smith wrote: > > >>OK. I download last nights snapshot and it test just hangs. A thread > >>dump is below. Also why is > >>[junit] at > >>com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:575) > >> [junit] at > >>com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:535) > >> [junit] at > >>com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:453) > >> [junit] at > >>com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:325) > >> [junit] at > >>com.gargoylesoftware.htmlunit.html.HtmlPage.executeRefreshIfNeeded(HtmlPage.java:954) > >> [junit] at > >>com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:141) > >> > >>Repeated at least 20 times before the top of the dump below? There are 6 > >>.js includes and one .css include but it does not match the number of > >>occurrences of the loop. > > It would appear that a page refresh is being triggered every time the > page gets loaded and that you're consequently in an infinite loop. > Refresh can be triggered by javascript (onload handler) or a <meta> tag > or a refresh header in the http response. > > I assume that this page loads fine in a browser btw. > > The first thing I'd try would be a breakpoint or print statement in > HtmlPage.executeRefreshIfNeeded() to see what specifically has triggered > the refresh each time. -- Dave Smith CANdata Systems Ltd 416-493-9020 |
From: Mike B. <mb...@Ga...> - 2004-04-01 14:59:26
|
Dave Smith wrote: > Well I can tell you there is a meta tag for refresh but it is 60 secs. > It looks like this ... > <meta HTTP-EQUIV="REFRESH" > CONTENT="60;URL=https://192.168.1.2:8443/aci/FindShipmentAction.do"/> > Looks like you are ignoring the time in seconds ... Yes, HtmlUnit is ignoring the time and is doing an immediate refresh. I'd assumed, incorrectly it seems, that nobody cared about testing the intermediate pages and that going straight for the refresh would work for everyone. This will need to be revisited. I suspect that waiting for the full time isn't really what's desired either as that will cause the tests to take much longer to run. Possibly a callback mechanism so that the tests can be notified that they are viewing a page that will be refreshed. Suggestions are always welcome. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Dave S. <dav...@ca...> - 2004-04-01 15:10:29
|
Yah .. in my case it is the first page that they enter so we are trying to test some basic navigation. For me there are two cases ... 1) Just ignore the refresh. 2) A callback that would allow me to insert data into the database then execute the refresh. It would seem that the a callback boolean executeRefresh(int time); Would be in order .. If it returns false then do not refresh otherwise refresh. I would say the default case would be to not refresh because the only test case I can think of would involve manipulating data before the page is refreshed. This would require notification of the refresh attempt. On Thu, 2004-04-01 at 09:58, Mike Bowler wrote: > Dave Smith wrote: > > > Well I can tell you there is a meta tag for refresh but it is 60 secs. > > It looks like this ... > > <meta HTTP-EQUIV="REFRESH" > > CONTENT="60;URL=https://192.168.1.2:8443/aci/FindShipmentAction.do"/> > > Looks like you are ignoring the time in seconds ... > > Yes, HtmlUnit is ignoring the time and is doing an immediate refresh. > I'd assumed, incorrectly it seems, that nobody cared about testing the > intermediate pages and that going straight for the refresh would work > for everyone. > > This will need to be revisited. I suspect that waiting for the full > time isn't really what's desired either as that will cause the tests to > take much longer to run. Possibly a callback mechanism so that the > tests can be notified that they are viewing a page that will be refreshed. > > Suggestions are always welcome. -- Dave Smith CANdata Systems Ltd 416-493-9020 |
From: Dave S. <dav...@ca...> - 2004-04-01 19:51:35
|
I am interested in pursuing this, where do we go from here? On Thu, 2004-04-01 at 10:10, Dave Smith wrote: > Yah .. in my case it is the first page that they enter so we are trying > to test some basic navigation. For me there are two cases ... > > 1) Just ignore the refresh. > 2) A callback that would allow me to insert data into the database then > execute the refresh. > > It would seem that the a callback boolean executeRefresh(int time); > Would be in order .. If it returns false then do not refresh otherwise > refresh. > > I would say the default case would be to not refresh because the only > test case I can think of would involve manipulating data before the page > is refreshed. This would require notification of the refresh attempt. > > > > On Thu, 2004-04-01 at 09:58, Mike Bowler wrote: > > Dave Smith wrote: > > > > > Well I can tell you there is a meta tag for refresh but it is 60 secs. > > > It looks like this ... > > > <meta HTTP-EQUIV="REFRESH" > > > CONTENT="60;URL=https://192.168.1.2:8443/aci/FindShipmentAction.do"/> > > > Looks like you are ignoring the time in seconds ... > > > > Yes, HtmlUnit is ignoring the time and is doing an immediate refresh. > > I'd assumed, incorrectly it seems, that nobody cared about testing the > > intermediate pages and that going straight for the refresh would work > > for everyone. > > > > This will need to be revisited. I suspect that waiting for the full > > time isn't really what's desired either as that will cause the tests to > > take much longer to run. Possibly a callback mechanism so that the > > tests can be notified that they are viewing a page that will be refreshed. > > > > Suggestions are always welcome. -- Dave Smith CANdata Systems Ltd 416-493-9020 |
From: Mike B. <mb...@Ga...> - 2004-04-02 15:50:46
|
Dave Smith wrote: > I am interested in pursuing this, where do we go from here? There are a couple of options: 1) You can make the change yourself and submit a patch. Assuming the patch follows the guidelines then it will be added to the main codebase. http://htmlunit.sourceforge.net/submittingPatches.html 2) You can open a bug and wait for someone else to fix it. Now that I've thought about the consequences, I'm considering this a serious bug so it's likely to get higher priority (from me anyway, if nobody else). 3) You can just patch your own local copy to do what you need. This has the drawback that the change isn't in the main codebase but it's always an option as the code is open. If you decide to make code changes yourself then I'd recommend subscribing to the developers list as well. I'd like to see this one fixed quickly and will try to find some time over the next couple of days but time is tight and open source projects take lower priority than my consulting work (which is what pays the bills) and my family. Of course if someone wanted to hire me to work on open source... ;-) -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Dave S. <dav...@ca...> - 2004-04-02 15:56:43
|
OK. If you think it is serious and will get to it in the next couple of days (I have a family to feed and a business to run , so I know ..) that will be fine. I just wanted to make sure we were not dropping the ball. Let me know when you have a fix and I will do my part and test it for you.... On Fri, 2004-04-02 at 10:50, Mike Bowler wrote: > Dave Smith wrote: > > I am interested in pursuing this, where do we go from here? > > There are a couple of options: > > 1) You can make the change yourself and submit a patch. Assuming the > patch follows the guidelines then it will be added to the main codebase. > > http://htmlunit.sourceforge.net/submittingPatches.html > > 2) You can open a bug and wait for someone else to fix it. Now that > I've thought about the consequences, I'm considering this a serious bug > so it's likely to get higher priority (from me anyway, if nobody else). > > 3) You can just patch your own local copy to do what you need. This has > the drawback that the change isn't in the main codebase but it's always > an option as the code is open. > > If you decide to make code changes yourself then I'd recommend > subscribing to the developers list as well. > > I'd like to see this one fixed quickly and will try to find some time > over the next couple of days but time is tight and open source projects > take lower priority than my consulting work (which is what pays the > bills) and my family. Of course if someone wanted to hire me to work on > open source... ;-) -- Dave Smith CANdata Systems Ltd 416-493-9020 |
From: Mike B. <mb...@Ga...> - 2004-04-06 02:50:34
|
Dave Smith wrote: > Let me know when you have a fix and I will do my part and test it for > you.... I've just checked some changes into cvs. Look at setRefreshHandler() in WebClient. The RefreshHandler that you specify will be called just before the page is going to execute a refresh. If you return true then the refresh will continue and if you return false then the refresh will be aborted. This presently works for refreshes triggered by meta tags and by the refresh response header but does not work for javascript refreshes (yet). Let me know if this does what you need. -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Dave S. <dav...@ca...> - 2004-04-06 13:48:56
|
OK. the good news is the refresh handler works great, the bad news is the original reason for the update was to fix a javascript error where we were trying to get the field name with the [] notation, where the value in the [] is a javascript array. Now where to .. places to look ? On Mon, 2004-04-05 at 22:38, Mike Bowler wrote: > Dave Smith wrote: > > Let me know when you have a fix and I will do my part and test it for > > you.... > > I've just checked some changes into cvs. Look at setRefreshHandler() in > WebClient. > > The RefreshHandler that you specify will be called just before the page > is going to execute a refresh. If you return true then the refresh will > continue and if you return false then the refresh will be aborted. > > This presently works for refreshes triggered by meta tags and by the > refresh response header but does not work for javascript refreshes (yet). > > Let me know if this does what you need. -- Dave Smith CANdata Systems Ltd 416-493-9020 |