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