[Webtest] HtmlUnit jar file and classpath

Lisa Crispin webtest@lists.canoo.com
Mon, 22 Nov 2004 22:45:31 +0000


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

I'm sure this is an ignorant question.  But I've asked worse. ;->
 
When I first installed WebTest, I had to put every jar file that WebTest uses in my classpath on my Windows machine to get it to work (whether I should need to do this, I don't know).  However, when we installed WebTest on our build machine (Linux), nobody set up a classpath for it, just the webtesthome environment variable, and it worked fine.
 
I've been running the HtmlUnit-based WebTest on my machine for a couple of weeks now.  Today we installed it (build 570) on our build machine.  When we tried to run a WebTest script, it failed because it couldn't find the HtmlUnit jar file.  This jar file is now in the canoo/lib/base directory.  But for some reason, it got this error: com/gargoylesoftware/htmlunit/ElementNotFoundException
 
In some earlier build of WebTest with HtmlUnit (eg. build 560) there were HtmlUnit jar files in the canoo/lib directory.  I still had those, because I'm just extracting the new builds out to my machine without deleting anything.  So it kept working on my machine.  I moved them out, so I only had the HtmlUnit jar file in canoo/lib/base, and got the same failure.
 
We moved the HtmlUnit jar file (actual name is HtmlUnit-2004-11-19.jar) to the canoo/lib directory on our build machine to get it to work. 
 
My questions are:
Should we have an entry in the Classpath for the HtmlUnit jar file? 
 
If not, how do we get it to look in the canoo/lib/base directory for it, instead of canoo/lib?
 
If we do need it in the Classpath, does that mean we have to update the Classpath every time the name changes (since there’s a date stamp in the name, I assume it will change sometime)?
 
Thanks,
Lisa
--NextPart_Webmail_9m3u9jl4l_24084_1101163531_0
Content-Type: text/html
Content-Transfer-Encoding: 8bit

<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">I'm sure this is an ignorant question.&nbsp; But&nbsp;I've asked worse. ;-&gt;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">When I first installed WebTest, I had to put every jar file that WebTest uses in my classpath on my Windows machine to get it to work (whether I should need to do this, I don't know).&nbsp; However, when we installed WebTest on&nbsp;our build machine (Linux), nobody set up a classpath for it, just the webtesthome environment variable, and it worked fine.<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">I've been running the HtmlUnit-based WebTest on my machine for a couple of weeks now.&nbsp; Today we installed it (build 570) on our build machine.&nbsp; When we tried to run a WebTest script, it failed because it couldn't find the HtmlUnit jar file.&nbsp; This jar file is now in the canoo/lib/base directory.&nbsp; But for some reason, it got this error: com/gargoylesoftware/htmlunit/ElementNotFoundException</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">In some earlier build of WebTest with HtmlUnit (eg. build 560)&nbsp;there were HtmlUnit jar files in&nbsp;the canoo/lib directory.&nbsp; I still had those, because I'm just extracting the new builds out to my machine without deleting anything.&nbsp; So it kept working on my machine.&nbsp; I moved them out, so I only had the&nbsp;HtmlUnit jar file in canoo/lib/base,&nbsp;and got the same failure.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">We moved the HtmlUnit jar file (actual name is HtmlUnit-2004-11-19.jar) to the canoo/lib directory on our build machine to get it to work.&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">My questions are:<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Should we have an entry in the Classpath for the HtmlUnit jar file?&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">If not, how do we get it to look in the canoo/lib/base directory for it, instead of canoo/lib?</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">If we do need it in the Classpath, does that mean we have to update the Classpath every time the name changes (since there’s a date stamp in the name, I assume it will change sometime)?</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Thanks,</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Lisa<o:p></o:p></P></DIV>
<DIV class=signature id=signature></DIV>
<!-- END WEBMAIL STATIONERY -->

</body>
</html>

--NextPart_Webmail_9m3u9jl4l_24084_1101163531_0--