[Webtest] Re: HTMLUnit

Lisa Crispin webtest@lists.canoo.com
Fri, 05 Nov 2004 18:55:17 +0000


--NextPart_Webmail_9m3u9jl4l_29324_1099680917_0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

Hi Marc,
You're right, this code is in the init() function.  I don't know how to produce a simple page to reproduce this error.  One of the programmers I work with is going to look at it, and see if he can put that page together, if he can't figure out the problem either.  We have budgeted time into our sprint to work through these problems with our WebTest scripts and this new WebTest version, because we really need the javascript support now.  Thanks again for your help!
-- Lisa


-------------- Original message from Marc Guillemot <mguillemot@yahoo.fr>: -------------- 


> Hi Lisa, 
> 
> as I don't have the source I can only made some assumptions. 
> 
> I guess that the js performs some operations directly when loaded. Look where 
> your init() function is called. Or try 
> with Mozilla JS debugger placing a breakpoint on the init function and calling 
> the page again. You should see the call 
> stack. 
> 
> Can you provide a simple page reproducing this error with this js as alread 
> asked by Mittie? 
> 
> Marc. 
> 
> Lisa Crispin wrote: 
> > So far we have not been able to fix our problem where HTMLUnit is giving 
> > us an error. We are going to keep looking, but I have two questions: 
> > 1. Why does HTMLUnit give an error on javascript that is included, but 
> > not executed on a page? Is this normal behavior for HTMLUnit? 
> > 2. Has anyone seen this error, or can anyone give us any clues as to 
> > how to fix it? 
> > 
> > The error message in the result file points to the submitBtn, but it is 
> > the page that the submitBtn would bring up that actually contains the 
> > include for the javascript (almost all our pages have this include). 
> > Again, this page does not actually USE the javascript, only has an 
> > include for it. The first part of the error message: 
> > 
> > [testSpec] EcmaError: lineNumber=[186] column=[0] 
> > lineSource=[crossobj=(dom)?window.document.getElementById('calendar').style 
> > : ie? window.document.all.calendar : window.document.calendar;] 
> > name=[TypeError] 
> > sourceName=[/include/javascript/calendar/popcalendar.js] message=[Cannot 
> > convert null to an object.] errorObject=[TypeError: Cannot convert null 
> > to an object.] 
> > [testSpec] com.gargoylesoftware.htmlunit.ScriptException: Cannot 
> > convert null to an object. 
> > [testSpec] at 
> > 
> com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngi 
> ne.java:275) 
> > ... 
> > 
> > The javascript in question is popcalendar.js, we got it from 
> > www.pengz.com but now this site is inactive. 
> > 
> > Here is the block of code from the javascript where the error occurs. I 
> > appreciate any clues anyone can give! 
> > function init() { 
> > if (!ns4) 
> > { 
> > if (!ie) yearNow += 1900; 
> > crossobj=(dom)?window.document.getElementById('calendar').style : 
> > ie?window.document.all.calendar : window.document.calendar; 
> > hideCalendar(); 
> > crossMonthObj = (dom) ? 
> > window.document.getElementById('selectMonth').style : ie ? 
> > window.document.all.selectMonth : window.document.selectMonth; 
> > crossYearObj = (dom) ? 
> > window.document.getElementById('selectYear').style : ie ? 
> > window.document.all.selectYear : window.document.selectYear; 
> > monthConstructed = false; 
> > yearConstructed = false; 
> > 
> > if (showToday == 1) { 
> > window.document.getElementById('lbl Today').innerHTML = '> > color="#000066">' + todayString[language] + ' > > onmousemove="window.status=\''+gotoString[language]+'\'" 
> > onmouseout="window.status=\'\'" title="'+gotoString[language]+'" 
> > style="'+styleAnchor+'" 
> > 
> href="javascript:monthSelected=monthNow;yearSelected=yearNow;constructCalendar() 
> ;">'+dayName[language][(today.getDay()-startAt==-1)?6:(today.getDay()-startAt)]+ 
> ', 
> > ' + dateNow + ' ' + monthName[language][monthNow].substring(0,3) + ' ' + 
> > yearNow + ''; 
> > } 
> > sHTML1 = '> > 
> onmouseover="swapImage(\'changeLeft\',\'left2.gif\');this.style.borderColor=\'#8 
> af\';window.status=\''+scrollLeftMessage[language]+'\'" 
> > onclick="decMonth()" 
> > 
> onmouseout="clearInterval(intervalID1);swapImage(\'changeLeft\',\'left1.gif\');t 
> his.style.borde 
> > rColor=\'#36f\';window.status=\'\'" 
> > 
> onmousedown="clearTimeout(timeoutID1);timeoutID1=setTimeout(\'StartDecMonth()\', 
> 500)" 
> > onmouseup="clearTimeout(timeoutID1);clearInterval(intervalID1)"> > > id="changeLeft" src="'+imgDir+'left1.gif" width="10" height="11" 
> > border="0">  '; 
> > sHTML1 += '> > 
> onmouseover="swapImage(\'changeRight\',\'right2.gif\');this.style.borderColor=\' 
> #8af\';window.status=\''+scrollRightMessage[language]+'\'" 
> > 
> onmouseout="clearInterval(intervalID1);swapImage(\'changeRight\',\'right1.gif\') 
> ;this.style.borderColor=\'#36f\';window.status=\'\'" 
> > onclick="incMonth()" 
> > 
> onmousedown="clearTimeout(timeoutID1);timeoutID1=setTimeout(\'StartIncMonth()\', 
> 500)" 
> > onmouseup="clearTimeout(timeoutID1);clearInterval(intervalID1)"> > > id="chan geRight" src="'+imgDir+'right1.gif" width="10" height="11" 
> > border="0">  '; 
> > sHTML1 += '> > 
> onmouseover="swapImage(\'changeMonth\',\'drop2.gif\');this.style.borderColor=\'# 
> 8af\';window.status=\''+selectMonthMessage[language]+'\'" 
> > 
> onmouseout="swapImage(\'changeMonth\',\'drop1.gif\');this.style.borderColor=\'#3 
> 6f\';window.status=\'\'" 
> > onclick="popUpMonth()"> '; 
> > sHTML1 += '> > 
> onmouseover="swapImage(\'changeYear\',\'drop2.gif\');this.style.borderColor=\'#8 
> af\';window.status=\''+selectYearMessage[language]+'\'" 
> > 
> onmouseout="swapImage(\'changeYear\',\'drop1.gif\');this.style.borderColor=\'#36 
> f\';window.status=\'\'" 
> > onclick="popUpYear()">& ;nbsp;'; 
> > 
> > window.document.getElementById('caption').innerHTML = sHTML1; 
> > bPageLoaded=true; 
> > } 
> > } 
> > 
> > -------------- Original message from "Dierk Koenig" 
> > : -------------- 
> > 
> > Hi Lisa, 
> > 
> > I guess we will see quite some of those errors until the migration 
> > is finished. 
> > Thanx for trying the snapshot and posting the error. This is the 
> > only way for us to 
> > find the issues. I'm sorry for the extra work that we put on you. 
> > 
> > Concerning the issue below I would assume that there is a difference 
> > between the working and the failing "click". Most likely it is in 
> > the Html/JS of the 
> > current page. 
> > Could you provide the pages or at least the snippets that contain the 
> > concerning html tags? 
> > Is there anything else written to the console beside the stacktrace? 
> > 
> > cheers 
> > Mittie 
> > 
> > 
> > 
> > -----Original Message----- 
> > *From:* webtest-admin@lists.canoo.com 
> > [mailto:webtest-admin@lists.canoo.com]*On 
> > Behalf Of *Lisa Crispin 
> > *Sent:* Mittwoch, 3. November 2004 23:03 
> > *To:* webtest@lists.canoo.com 
> > *Subject:* RE: [Webtest] HTMLUnit 
> > 
> > Hi, 
> > I downloaded the new version (build 548) from the download page, 
> > and commented out all the extensions stuff in 
> > webtestTaskdefs.properties. I also had to take the verbose 
> > option out of my config.xml file, as it is deprecated (I try to 
> > keep ahead of the to-be-deprecated stuff but I missed that one!) 
> > 
> > When I tried to run an existing script, I got this error: 
> > Unexpected exception caught: 
> > com.gargoylesoftware.htmlunit.ScriptException: Cannot convert 
> > null to an object. 
> > With the stacktrace below. The clicklink it complains about is 
> > simply: 
> > > > label="plan administration login"/> 
> > 
> > I tried a different script, this one got the same error on a 
> > clickbutton. However, when I ran a third script that has 
> > exactly the same clickbutton step (same page, same button), it 
> > worked fine. Needless to say, all these work fine with the 
> > older version I have from September, build 516. I'm baffled! 
> > 
> > What is wrong? 
> > thanks, 
> > Lisa 
> > 
> > Stacktrace: 
> > 
> > com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: 
> com.gargoylesoftware.htmlunit.ScriptException: Cannot convert null to an 
> object., Step: ClickLink at 
> C:\java\eplan\test\WebTest\SmokeTest\PlanAdminTourTest.xml:36: with 
> (label="plan administration login", stepId="Click the Plan Administration Link", 
> stepType="clicklink") 
> > at com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:399) 
> > at com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:110) 
> > at 
> com.canoo.webtest.steps.request.ClickLink.doExecute(ClickLink.java:67) 
> > at com.canoo.webtest.steps.Step.execute(Step.java:129) 
> > at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26) 
> > at 
> com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:6 
> 8) 
> > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) 
> > at org.apache.tools.ant.Task.perform(Task.java:401) 
> > at org.apache.tools.ant.Target.execute(Target.java:338) 
> > at org.apache.tools.ant.Target.performTasks(Target.java:365) 
> > at org.apache.tools.ant.Project.executeTarget(Project.java:1237) 
> > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:420) 
> > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) 
> > at org.apache.tools.ant.Task.perform(Task.java:401) 
> > at org.apache.tools.ant.Target.execute(Target.java:338) 
> > at org.apache.tools.ant.Target.performTasks(Target.java:365) 
> > at org.apache.tools.ant.Project.executeTarget(Project.java:1237) 
> > at org.apache.tools.ant.Project.executeTargets(Project.java:1094) 
> > at org.apache.tools.ant.Main.runBuild(Main.java:669) 
> > at org.apache.tools.ant.Main.startAnt(Main.java:220) 
> > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) 
> > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) 
> > 
> > 
> > 
> > 
> > 
> > -------------- Original message from "Dierk Koenig" 
> > : 
> > -------------- 
> > 
> > Hi Lisa, 
> > 
> > for a preview you can go to the newly created download page 
> > and get the snapshot. 
> > Note that with the snapshot your custom steps and most of 
> > the extension steps do not 
> > work, yet. But it should be good enough to run the core steps. 
> > 
> > cheers 
> > Mittie 
> > 
> > -----Original Message----- 
> > *From:* 
> > webtest-admin@lists.canoo.com 
> > [mailto:webtest-admin@lists.canoo.com]*On 
> > Behalf Of *Lisa Crispin 
> > *Sent:* Mittwoch, 3. November 2004 18:42 
> > *To:* webtest@lists.canoo.com 
> > *Subject:* Re: [Webtest] HTMLUnit 
> > 
> > Hi Marc, 
> > Thank you so much for the information. From the 
> > postings, it sounds like the release based on 
> > HTMLUnit will happen fairly soon? Are we talking 
> > weeks? It will be something to distract me from my 
> > post-election depression. 
> > thanks, 
> > Lisa 
> > 
> > -------------- Original message from Marc Guillemot 
> > : 
> > -------------- 
> > 
> > 
> > > Hi Lisa, 
> > > 
> > > Comment below 
> > > 
> > > > I saw Marc's posting from last week about the 
> > HTMLUnit migration. As we 
> > > > must test a new UI in the next two months that 
> > has a significant amount 
> > > > of Javascript, I would like to know: 
> > > > 
> > > > Will the HTMLUnit mean that we should be able 
> > to test this with WebTest 
> > > > scripts? (Seems I have seen postings to this 
> > effect) 
> > > 
> > > I would only say, that it will allow to test more 
> > JavaScript features and that 
> > > it's easier to implement missing js 
> > > functionnalities (for java programmers). While 
> > working on the migration, I've 
> > > improved (just a bit) the javascript 
> > > support of htmlunit for the need of the selftests. 
> > > 
> > > > How long until I can actually install and use 
> > Canoo WebTest based on 
> > > > HTMLUnit? (Not to sound impatient). Is there a 
> > list of new features 
> > > > somewhere that this release will have? 
> > > 
> > > Currently not. If you look at 
> > > 
> > 
> http://htmlunit.sourceforge.net/javascriptConfiguration.html, 
> > you can have an 
> > > idea of 
> > > which js features htmlunit currently accepts. 
> > > 
> > > > If HTMLUnit isn't the answer for Javascript 
> > support, should I be looking 
> > > > at Groovy, or what? 
> > > 
> > > Groovy "just" allows to write more flexible test 
> > scripts. It has nothing to do 
> > > with Javascript support. 
> > > 
> > > Marc. 
> > > 
> > > _______________________________________________ 
> > > WebTest mailing list 
> > > ; WebTest@lists.canoo.com 
> > > http://lists.canoo.com/mailman/listinfo/webtest 
> > 
> 
> _______________________________________________ 
> WebTest mailing list 
> WebTest@lists.canoo.com 
> http://lists.canoo.com/mailman/listinfo/webtest 
--NextPart_Webmail_9m3u9jl4l_29324_1099680917_0
Content-Type: text/html
Content-Transfer-Encoding: 8bit

<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>Hi Marc,</DIV>
<DIV>You're right, this code is in the init() function.&nbsp; I don't know how to produce a simple page to reproduce this error.&nbsp; One of the programmers I work with is going to look at it, and see if he can put that page together, if he can't figure out the problem either.&nbsp; We have budgeted time into&nbsp;our sprint to work through these problems with our WebTest scripts and this new WebTest version, because we really need the javascript support now.&nbsp; Thanks again for your help!</DIV>
<DIV>-- Lisa</DIV><BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message from Marc Guillemot &lt;mguillemot@yahoo.fr&gt;: -------------- <BR><BR><BR>&gt; Hi Lisa, <BR>&gt; <BR>&gt; as I don't have the source I can only made some assumptions. <BR>&gt; <BR>&gt; I guess that the js performs some operations directly when loaded. Look where <BR>&gt; your init() function is called. Or try <BR>&gt; with Mozilla JS debugger placing a breakpoint on the init function and calling <BR>&gt; the page again. You should see the call <BR>&gt; stack. <BR>&gt; <BR>&gt; Can you provide a simple page reproducing this error with this js as alread <BR>&gt; asked by Mittie? <BR>&gt; <BR>&gt; Marc. <BR>&gt; <BR>&gt; Lisa Crispin wrote: <BR>&gt; &gt; So far we have not been able to fix our problem where HTMLUnit is giving <BR>&gt; &gt; us an error. We are going to keep looking, but I have two questions: <BR>&gt; &gt; 1. Why does HTMLUnit give an error on javascript that is included, but <BR>&gt; &gt; not executed on a page? Is this normal behavior for HTMLUnit? <BR>&gt; &gt; 2. Has anyone seen this error, or can anyone give us any clues as to <BR>&gt; &gt; how to fix it? <BR>&gt; &gt; <BR>&gt; &gt; The error message in the result file points to the submitBtn, but it is <BR>&gt; &gt; the page that the submitBtn would bring up that actually contains the <BR>&gt; &gt; include for the javascript (almost all our pages have this include). <BR>&gt; &gt; Again, this page does not actually USE the javascript, only has an <BR>&gt; &gt; include for it. The first part of the error message: <BR>&gt; &gt; <BR>&gt; &gt; [testSpec] EcmaError: lineNumber=[186] column=[0] <BR>&gt; &gt; lineSource=[crossobj=(dom)?window.document.getElementById('calendar').style <BR>&gt; &gt; : ie? window.document.all.calendar : window.document.calendar;] <BR>&gt; &gt; name=[TypeError] <BR>&gt; &gt; sourceName=[/include/javascript/calendar/popcalendar.js] message=[Cannot <BR>&gt; &gt; convert null to an object.] errorObject=[TypeError: Cannot convert null <BR>&gt; &gt; to an object.] <BR>&gt; &gt; [testSpec] com.gargoylesoftware.htmlunit.ScriptException: Cannot <BR>&gt; &gt; convert null to an object. <BR>&gt; &gt; [testSpec] at <BR>&gt; &gt; <BR>&gt; com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngi <BR>&gt; ne.java:275) <BR>&gt; &gt; ... <BR>&gt; &gt; <BR>&gt; &gt; The javascript in question is popcalendar.js, we got it from <BR>&gt; &gt; www.pengz.com <HTTP: www.pengz.com>but now this site is inactive. <BR>&gt; &gt; <BR>&gt; &gt; Here is the block of code from the javascript where the error occurs. I <BR>&gt; &gt; appreciate any clues anyone can give! <BR>&gt; &gt; function init() { <BR>&gt; &gt; if (!ns4) <BR>&gt; &gt; { <BR>&gt; &gt; if (!ie) yearNow += 1900; <BR>&gt; &gt; crossobj=(dom)?window.document.getElementById('calendar').style : <BR>&gt; &gt; ie?window.document.all.calendar : window.document.calendar; <BR>&gt; &gt; hideCalendar(); <BR>&gt; &gt; crossMonthObj = (dom) ? <BR>&gt; &gt; window.document.getElementById('selectMonth').style : ie ? <BR>&gt; &gt; window.document.all.selectMonth : window.document.selectMonth; <BR>&gt; &gt; crossYearObj = (dom) ? <BR>&gt; &gt; window.document.getElementById('selectYear').style : ie ? <BR>&gt; &gt; window.document.all.selectYear : window.document.selectYear; <BR>&gt; &gt; monthConstructed = false; <BR>&gt; &gt; yearConstructed = false; <BR>&gt; &gt; <BR>&gt; &gt; if (showToday == 1) { <BR>&gt; &gt; window.document.getElementById('lbl Today').innerHTML = '<FONT <BR>&gt; &gt; color="#000066"&gt;' + todayString[language] + ' <A <BR>&gt; &gt; onmousemove="window.status=\''+gotoString[language]+'\'" <BR>&gt; &gt; onmouseout="window.status=\'\'" title="'+gotoString[language]+'" <BR>&gt; &gt; style="'+styleAnchor+'" <BR>&gt; &gt; <BR>&gt; href="javascript:monthSelected=monthNow;yearSelected=yearNow;constructCalendar() <BR>&gt; ;"&gt;'+dayName[language][(today.getDay()-startAt==-1)?6:(today.getDay()-startAt)]+ <BR>&gt; ', <BR>&gt; &gt; ' + dateNow + ' ' + monthName[language][monthNow].substring(0,3) + ' ' + <BR>&gt; &gt; yearNow + '</A></FONT>'; <BR>&gt; &gt; } <BR>&gt; &gt; sHTML1 = '<SPAN id=spanLeft style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; CURSOR: pointer; BORDER-BOTTOM: 1px solid" <BR>&gt; &gt; <BR>&gt; onmouseover="swapImage(\'changeLeft\',\'left2.gif\');this.style.borderColor=\'#8 <BR>&gt; af\';window.status=\''+scrollLeftMessage[language]+'\'" <BR>&gt; &gt; onclick="decMonth()" <BR>&gt; &gt; <BR>&gt; onmouseout="clearInterval(intervalID1);swapImage(\'changeLeft\',\'left1.gif\');t <BR>&gt; his.style.borde <BR>&gt; &gt; rColor=\'#36f\';window.status=\'\'" <BR>&gt; &gt; <BR>&gt; onmousedown="clearTimeout(timeoutID1);timeoutID1=setTimeout(\'StartDecMonth()\', <BR>&gt; 500)" <BR>&gt; &gt; onmouseup="clearTimeout(timeoutID1);clearInterval(intervalID1)"&gt;&nbsp;<IMG <BR>&gt; &gt; id="changeLeft" src="'+imgDir+'left1.gif" width="10" height="11" <BR>&gt; &gt; border="0"&gt;&nbsp;</SPAN>&nbsp;'; <BR>&gt; &gt; sHTML1 += '<SPAN id=spanRight style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; CURSOR: pointer; BORDER-BOTTOM: 1px solid" <BR>&gt; &gt; <BR>&gt; onmouseover="swapImage(\'changeRight\',\'right2.gif\');this.style.borderColor=\' <BR>&gt; #8af\';window.status=\''+scrollRightMessage[language]+'\'" <BR>&gt; &gt; <BR>&gt; onmouseout="clearInterval(intervalID1);swapImage(\'changeRight\',\'right1.gif\') <BR>&gt; ;this.style.borderColor=\'#36f\';window.status=\'\'" <BR>&gt; &gt; onclick="incMonth()" <BR>&gt; &gt; <BR>&gt; onmousedown="clearTimeout(timeoutID1);timeoutID1=setTimeout(\'StartIncMonth()\', <BR>&gt; 500)" <BR>&gt; &gt; onmouseup="clearTimeout(timeoutID1);clearInterval(intervalID1)"&gt;&nbsp;<IMG <BR>&gt; &gt; id="chan geRight" src="'+imgDir+'right1.gif" width="10" height="11" <BR>&gt; &gt; border="0"&gt;&nbsp;</SPAN>&nbsp;'; <BR>&gt; &gt; sHTML1 += '<SPAN id=spanMonth style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; CURSOR: pointer; BORDER-BOTTOM: 1px solid" <BR>&gt; &gt; <BR>&gt; onmouseover="swapImage(\'changeMonth\',\'drop2.gif\');this.style.borderColor=\'# <BR>&gt; 8af\';window.status=\''+selectMonthMessage[language]+'\'" <BR>&gt; &gt; <BR>&gt; onmouseout="swapImage(\'changeMonth\',\'drop1.gif\');this.style.borderColor=\'#3 <BR>&gt; 6f\';window.status=\'\'" <BR>&gt; &gt; onclick="popUpMonth()"&gt;</SPAN>&nbsp;'; <BR>&gt; &gt; sHTML1 += '<SPAN id=spanYear style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; CURSOR: pointer; BORDER-BOTTOM: 1px solid" <BR>&gt; &gt; <BR>&gt; onmouseover="swapImage(\'changeYear\',\'drop2.gif\');this.style.borderColor=\'#8 <BR>&gt; af\';window.status=\''+selectYearMessage[language]+'\'" <BR>&gt; &gt; <BR>&gt; onmouseout="swapImage(\'changeYear\',\'drop1.gif\');this.style.borderColor=\'#36 <BR>&gt; f\';window.status=\'\'" <BR>&gt; &gt; onclick="popUpYear()"&gt;</SPAN>&amp; ;nbsp;'; <BR>&gt; &gt; <BR>&gt; &gt; window.document.getElementById('caption').innerHTML = sHTML1; <BR>&gt; &gt; bPageLoaded=true; <BR>&gt; &gt; } <BR>&gt; &gt; } <BR>&gt; &gt; <BR>&gt; &gt; -------------- Original message from "Dierk Koenig" <BR>&gt; &gt; <DIERK.KOENIG@CANOO.COM>: -------------- <BR>&gt; &gt; <BR>&gt; &gt; Hi Lisa, <BR>&gt; &gt; <BR>&gt; &gt; I guess we will see quite some of those errors until the migration <BR>&gt; &gt; is finished. <BR>&gt; &gt; Thanx for trying the snapshot and posting the error. This is the <BR>&gt; &gt; only way for us to <BR>&gt; &gt; find the issues. I'm sorry for the extra work that we put on you. <BR>&gt; &gt; <BR>&gt; &gt; Concerning the issue below I would assume that there is a difference <BR>&gt; &gt; between the working and the failing "click". Most likely it is in <BR>&gt; &gt; the Html/JS of the <BR>&gt; &gt; current page. <BR>&gt; &gt; Could you provide the pages or at least the snippets that contain the <BR>&gt; &gt; concerning html tags? <BR>&gt; &gt; Is there anything else written to the console beside the stacktrace? <BR>&gt; &gt; <BR>&gt; &gt; cheers <BR>&gt; &gt; Mittie <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; -----Original Message----- <BR>&gt; &gt; *From:* webtest-admin@lists.canoo.com <BR>&gt; &gt; [mailto:webtest-admin@lists.canoo.com]*On <BR>&gt; &gt; Behalf Of *Lisa Crispin <BR>&gt; &gt; *Sent:* Mittwoch, 3. November 2004 23:03 <BR>&gt; &gt; *To:* webtest@lists.canoo.com <BR>&gt; &gt; *Subject:* RE: [Webtest] HTMLUnit <BR>&gt; &gt; <BR>&gt; &gt; Hi, <BR>&gt; &gt; I downloaded the new version (build 548) from the download page, <BR>&gt; &gt; and commented out all the extensions stuff in <BR>&gt; &gt; webtestTaskdefs.properties. I also had to take the verbose <BR>&gt; &gt; option out of my config.xml file, as it is deprecated (I try to <BR>&gt; &gt; keep ahead of the to-be-deprecated stuff but I missed that one!) <BR>&gt; &gt; <BR>&gt; &gt; When I tried to run an existing script, I got this error: <BR>&gt; &gt; Unexpected exception caught: <BR>&gt; &gt; com.gargoylesoftware.htmlunit.ScriptException: Cannot convert <BR>&gt; &gt; null to an object. <BR>&gt; &gt; With the stacktrace below. The clicklink it complains about is <BR>&gt; &gt; simply: <BR>&gt; &gt; <CLICKLINK <BR stepid="Click the Plan Administration Link">&gt; &gt; label="plan administration login"/&gt; <BR>&gt; &gt; <BR>&gt; &gt; I tried a different script, this one got the same error on a <BR>&gt; &gt; clickbutton. However, when I ran a third script that has <BR>&gt; &gt; exactly the same clickbutton step (same page, same button), it <BR>&gt; &gt; worked fine. Needless to say, all these work fine with the <BR>&gt; &gt; older version I have from September, build 516. I'm baffled! <BR>&gt; &gt; <BR>&gt; &gt; What is wrong? <BR>&gt; &gt; thanks, <BR>&gt; &gt; Lisa <BR>&gt; &gt; <BR>&gt; &gt; Stacktrace: <BR>&gt; &gt; <BR>&gt; &gt; com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: <BR>&gt; com.gargoylesoftware.htmlunit.ScriptException: Cannot convert null to an <BR>&gt; object., Step: ClickLink at <BR>&gt; C:\java\eplan\test\WebTest\SmokeTest\PlanAdminTourTest.xml:36: with <BR>&gt; (label="plan administration login", stepId="Click the Plan Administration Link", <BR>&gt; stepType="clicklink") <BR>&gt; &gt; at com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:399) <BR>&gt; &gt; at com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:110) <BR>&gt; &gt; at <BR>&gt; com.canoo.webtest.steps.request.ClickLink.doExecute(ClickLink.java:67) <BR>&gt; &gt; at com.canoo.webtest.steps.Step.execute(Step.java:129) <BR>&gt; &gt; at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26) <BR>&gt; &gt; at <BR>&gt; com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:6 <BR>&gt; 8) <BR>&gt; &gt; at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) <BR>&gt; &gt; at org.apache.tools.ant.Task.perform(Task.java:401) <BR>&gt; &gt; at org.apache.tools.ant.Target.execute(Target.java:338) <BR>&gt; &gt; at org.apache.tools.ant.Target.performTasks(Target.java:365) <BR>&gt; &gt; at org.apache.tools.ant.Project.executeTarget(Project.java:1237) <BR>&gt; &gt; at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:420) <BR>&gt; &gt; at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) <BR>&gt; &gt; at org.apache.tools.ant.Task.perform(Task.java:401) <BR>&gt; &gt; at org.apache.tools.ant.Target.execute(Target.java:338) <BR>&gt; &gt; at org.apache.tools.ant.Target.performTasks(Target.java:365) <BR>&gt; &gt; at org.apache.tools.ant.Project.executeTarget(Project.java:1237) <BR>&gt; &gt; at org.apache.tools.ant.Project.executeTargets(Project.java:1094) <BR>&gt; &gt; at org.apache.tools.ant.Main.runBuild(Main.java:669) <BR>&gt; &gt; at org.apache.tools.ant.Main.startAnt(Main.java:220) <BR>&gt; &gt; at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) <BR>&gt; &gt; at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; -------------- Original message from "Dierk Koenig" <BR>&gt; &gt; <DIERK.KOENIG@CANOO.COM>: <BR>&gt; &gt; -------------- <BR>&gt; &gt; <BR>&gt; &gt; Hi Lisa, <BR>&gt; &gt; <BR>&gt; &gt; for a preview you can go to the newly created download page <BR>&gt; &gt; and get the snapshot. <BR>&gt; &gt; Note that with the snapshot your custom steps and most of <BR>&gt; &gt; the extension steps do not <BR>&gt; &gt; work, yet. But it should be good enough to run the core steps. <BR>&gt; &gt; <BR>&gt; &gt; cheers <BR>&gt; &gt; Mittie <BR>&gt; &gt; <BR>&gt; &gt; -----Original Message----- <BR>&gt; &gt; *From:* <BR>&gt; &gt; webtest-admin@lists.canoo.com <BR>&gt; &gt; [mailto:webtest-admin@lists.canoo.com]*On <BR>&gt; &gt; Behalf Of *Lisa Crispin <BR>&gt; &gt; *Sent:* Mittwoch, 3. November 2004 18:42 <BR>&gt; &gt; *To:* webtest@lists.canoo.com <BR>&gt; &gt; *Subject:* Re: [Webtest] HTMLUnit <BR>&gt; &gt; <BR>&gt; &gt; Hi Marc, <BR>&gt; &gt; Thank you so much for the information. From the <BR>&gt; &gt; postings, it sounds like the release based on <BR>&gt; &gt; HTMLUnit will happen fairly soon? Are we talking <BR>&gt; &gt; weeks? It will be something to distract me from my <BR>&gt; &gt; post-election depression. <BR>&gt; &gt; thanks, <BR>&gt; &gt; Lisa <BR>&gt; &gt; <BR>&gt; &gt; -------------- Original message from Marc Guillemot <BR>&gt; &gt; <MGUILLEMOT@YAHOO.FR>: <BR>&gt; &gt; -------------- <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; &gt; Hi Lisa, <BR>&gt; &gt; &gt; <BR>&gt; &gt; &gt; Comment below <BR>&gt; &gt; &gt; <BR>&gt; &gt; &gt; &gt; I saw Marc's posting from last week about the <BR>&gt; &gt; HTMLUnit migration. As we <BR>&gt; &gt; &gt; &gt; must test a new UI in the next two months that <BR>&gt; &gt; has a significant amount <BR>&gt; &gt; &gt; &gt; of Javascript, I would like to know: <BR>&gt; &gt; &gt; &gt; <BR>&gt; &gt; &gt; &gt; Will the HTMLUnit mean that we should be able <BR>&gt; &gt; to test this with WebTest <BR>&gt; &gt; &gt; &gt; scripts? (Seems I have seen postings to this <BR>&gt; &gt; effect) <BR>&gt; &gt; &gt; <BR>&gt; &gt; &gt; I would only say, that it will allow to test more <BR>&gt; &gt; JavaScript features and that <BR>&gt; &gt; &gt; it's easier to implement missing js <BR>&gt; &gt; &gt; functionnalities (for java programmers). While <BR>&gt; &gt; working on the migration, I've <BR>&gt; &gt; &gt; improved (just a bit) the javascript <BR>&gt; &gt; &gt; support of htmlunit for the need of the selftests. <BR>&gt; &gt; &gt; <BR>&gt; &gt; &gt; &gt; How long until I can actually install and use <BR>&gt; &gt; Canoo WebTest based on <BR>&gt; &gt; &gt; &gt; HTMLUnit? (Not to sound impatient). Is there a <BR>&gt; &gt; list of new features <BR>&gt; &gt; &gt; &gt; somewhere that this release will have? <BR>&gt; &gt; &gt; <BR>&gt; &gt; &gt; Currently not. If you look at <BR>&gt; &gt; &gt; <BR>&gt; &gt; <BR>&gt; http://htmlunit.sourceforge.net/javascriptConfiguration.html, <BR>&gt; &gt; you can have an <BR>&gt; &gt; &gt; idea of <BR>&gt; &gt; &gt; which js features htmlunit currently accepts. <BR>&gt; &gt; &gt; <BR>&gt; &gt; &gt; &gt; If HTMLUnit isn't the answer for Javascript <BR>&gt; &gt; support, should I be looking <BR>&gt; &gt; &gt; &gt; at Groovy, or what? <BR>&gt; &gt; &gt; <BR>&gt; &gt; &gt; Groovy "just" allows to write more flexible test <BR>&gt; &gt; scripts. It has nothing to do <BR>&gt; &gt; &gt; with Javascript support. <BR>&gt; &gt; &gt; <BR>&gt; &gt; &gt; Marc. <BR>&gt; &gt; &gt; <BR>&gt; &gt; &gt; _______________________________________________ <BR>&gt; &gt; &gt; WebTest mailing list <BR>&gt; &gt; &gt; ; WebTest@lists.canoo.com <BR>&gt; &gt; &gt; http://lists.canoo.com/mailman/listinfo/webtest <BR>&gt; &gt; <BR>&gt; <BR>&gt; _______________________________________________ <BR>&gt; WebTest mailing list <BR>&gt; WebTest@lists.canoo.com <BR>&gt; http://lists.canoo.com/mailman/listinfo/webtest </BLOCKQUOTE>
<!-- END WEBMAIL STATIONERY -->

</body>
</html>

--NextPart_Webmail_9m3u9jl4l_29324_1099680917_0--