[Webtest] HTMLUnit
Lisa Crispin
webtest@lists.canoo.com
Wed, 03 Nov 2004 23:39:52 +0000
--NextPart_Webmail_9m3u9jl4l_6060_1099525192_0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
Hi Mittie,
I'm happy to try out the new version and find errors! It's the least I can do.
Looking at this further (why didn't I in the first place), the error appears to be NOT on the clickbutton or clicklink, but on the page that those bring up. Most pages on our site have a 'popcalendar.js' file included (it is only actually used on a few pages, but the error occurs when it is just included). This is javascript someone here found on the internet (I googled it and it seems to be commonly used). One of the programmers here just brought this javascript up in Eclipse, and Eclipse complained about it too. He thinks he knows how to fix it. (I hope so!)
It seems a little odd that HTMLUnit is looking at javascript that isn't even used on the page, but I guess it makes sense it wants correct javascript.
Thanks for your help.
-- Lisa
-------------- Original message from "Dierk Koenig" <dierk.koenig@canoo.com>: --------------
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:
<clicklink stepid="Click the Plan Administration Link"
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:68)
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" <dierk.koenig@canoo.com>: --------------
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 <mguillemot@yahoo.fr>: --------------
> 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
--NextPart_Webmail_9m3u9jl4l_6060_1099525192_0
Content-Type: text/html
Content-Transfer-Encoding: 8bit
<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>Hi Mittie,</DIV>
<DIV>I'm happy to try out the new version and find errors! It's the least I can do.</DIV>
<DIV> </DIV>
<DIV>Looking at this further (why didn't I in the first place), the error appears to be NOT on the clickbutton or clicklink, but on the page that those bring up. Most pages on our site have a 'popcalendar.js' file included (it is only actually used on a few pages, but the error occurs when it is just included). This is javascript someone here found on the internet (I googled it and it seems to be commonly used). One of the programmers here just brought this javascript up in Eclipse, and Eclipse complained about it too. He thinks he knows how to fix it. (I hope so!)</DIV>
<DIV> </DIV>
<DIV>It seems a little odd that HTMLUnit is looking at javascript that isn't even used on the page, but I guess it makes sense it wants correct javascript.</DIV>
<DIV> </DIV>
<DIV>Thanks for your help.</DIV>
<DIV>-- Lisa</DIV><BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message from "Dierk Koenig" <dierk.koenig@canoo.com>: -------------- <BR><BR><!-- BEGIN WEBMAIL STATIONERY -->
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>Hi Lisa,</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>I guess we will see quite some of those errors until the migration is finished.</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>Thanx for trying the snapshot and posting the error. This is the only way for us to</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>find the issues. I'm sorry for the extra work that we put on you.</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>Concerning the issue below I would assume that there is a difference</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>between the working and the failing "click". Most likely it is in the Html/JS of the</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>current page.</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>Could you provide the pages or at least the snippets that contain the </FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>concerning html tags?</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>Is there anything else written to the console beside the stacktrace?</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>cheers</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2>Mittie</FONT></SPAN></DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=943112122-03112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com]<B>On Behalf Of </B>Lisa Crispin<BR><B>Sent:</B> Mittwoch, 3. November 2004 23:03<BR><B>To:</B> webtest@lists.canoo.com<BR><B>Subject:</B> RE: [Webtest] HTMLUnit<BR><BR></FONT></DIV><!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>Hi,</DIV>
<DIV>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!)</DIV>
<DIV> </DIV>
<DIV>When I tried to run an existing script, I got this error:</DIV>
<DIV>Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot convert null to an object.</DIV>
<DIV>With the stacktrace below. The clicklink it complains about is simply:</DIV>
<DIV> <clicklink stepid="Click the Plan Administration Link"<BR> label="plan administration login"/></DIV>
<DIV> </DIV>
<DIV>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!</DIV>
<DIV> </DIV>
<DIV>What is wrong?</DIV>
<DIV>thanks,</DIV>
<DIV>Lisa</DIV>
<DIV> </DIV>
<DIV>Stacktrace:</DIV>
<DIV><PRE>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:68)
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)
</PRE></DIV>
<DIV> </DIV>
<DIV><BR> </DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message from "Dierk Koenig" <dierk.koenig@canoo.com>: -------------- <BR><BR><!-- BEGIN WEBMAIL STATIONERY -->
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<DIV><SPAN class=718364918-03112004><FONT face=Arial color=#0000ff size=2>Hi Lisa,</FONT></SPAN></DIV>
<DIV><SPAN class=718364918-03112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=718364918-03112004><FONT face=Arial color=#0000ff size=2>for a preview you can go to the newly created download page and get the snapshot.</FONT></SPAN></DIV>
<DIV><SPAN class=718364918-03112004><FONT face=Arial color=#0000ff size=2>Note that with the snapshot your custom steps and most of the extension steps do not</FONT></SPAN></DIV>
<DIV><SPAN class=718364918-03112004><FONT face=Arial color=#0000ff size=2>work, yet. But it should be good enough to run the core steps.</FONT></SPAN></DIV>
<DIV><SPAN class=718364918-03112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=718364918-03112004><FONT face=Arial color=#0000ff size=2>cheers</FONT></SPAN></DIV>
<DIV><SPAN class=718364918-03112004><FONT face=Arial color=#0000ff size=2>Mittie</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com]<B>On Behalf Of </B>Lisa Crispin<BR><B>Sent:</B> Mittwoch, 3. November 2004 18:42<BR><B>To:</B> webtest@lists.canoo.com<BR><B>Subject:</B> Re: [Webtest] HTMLUnit<BR><BR></FONT></DIV><!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>Hi Marc,</DIV>
<DIV>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.</DIV>
<DIV>thanks,</DIV>
<DIV>Lisa</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>> Comment below <BR>> <BR>> > I saw Marc's posting from last week about the HTMLUnit migration. As we <BR>> > must test a new UI in the next two months that has a significant amount <BR>> > of Javascript, I would like to know: <BR>> > <BR>> > Will the HTMLUnit mean that we should be able to test this with WebTest <BR>> > scripts? (Seems I have seen postings to this effect) <BR>> <BR>> I would only say, that it will allow to test more JavaScript features and that <BR>> it's easier to implement missing js <BR>> functionnalities (for java programmers). While 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 Canoo WebTest based on <BR>> > HTMLUnit? (Not to sound impatient). Is there a list of new features <BR>> > somewhere that this release will have? <BR>> <BR>> Currently not. If you look at <BR>> http://htmlunit.sourceforge.net/javascriptConfiguration.html, you can have an <BR>> idea of <BR>> which js features htmlunit currently accepts. <BR>> <BR>> > If HTMLUnit isn't the answer for Javascript support, should I be looking <BR>> > at Groovy, or what? <BR>> <BR>> Groovy "just" allows to write more flexible test 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 </BLOCKQUOTE></BLOCKQUOTE><!-- END WEBMAIL STATIONERY --></BLOCKQUOTE></BLOCKQUOTE><!-- END WEBMAIL STATIONERY --></BLOCKQUOTE>
<!-- END WEBMAIL STATIONERY -->
</body>
</html>
--NextPart_Webmail_9m3u9jl4l_6060_1099525192_0--