[Webtest] Debug output from HtmlUnit

Lisa Crispin webtest@lists.canoo.com
Thu, 11 Nov 2004 01:19:15 +0000


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

Thank you, Jeff.  Indeed, we were using a very old and outdated way of setting focus in Javascript, it must have only been supported in IE 4 or something.  (The fact that there is a 1998 version of a Javascript book on the programmer's desk gave us a clue).  One of the programmers here has updated that and it fixed this problem.

Now just have to get past that pesky Clickbutton problem and we might be able to use this cool new WebTest based on HtmlUnit!
-- Lisa


-------------- Original message from "Jeff Nielsen" <jeff.nielsen@digitalfocus.com>: -------------- 


> Check that the Javascript you show below is "standard" javascript that Rhino 
> understands. We have had several problems with HtmlUnit/Rhino where we were 
> using IE-specific Javascript in our pages. This fact didn't come to light 
> until we started running the functional tests. 
> 
> 
> -- 
> Jeff Nielsen 
> Chief Scientist, Digital Focus 
> www.digitalfocus.com 
> 
> ----- Original Message ----- 
> From: "Lisa Crispin" 
> To: 
> Sent: Wednesday, November 10, 2004 1:28 PM 
> Subject: Re: [Webtest] Debug output from HtmlUnit 
> 
> 
> > Thanks, we did figure out this particular problem, although not from the 
> > debug. In case anyone else has this problem, here it is. We had what may 
> > be considered a hack to put the tab focus in the right text box. 
> > 
> > 
> > HtmlUnit doesn't like this when it goes to invoke the page. 
> > 
> > We can't seem to get the focus set any other way (I don't know the 
> > particulars) so we are going to set a flag to remove this bit of 
> > Javascript for running tests. 
> > 
> > Does anyone have any ideas on my other post - about the clickbutton not 
> > working in the new WebTest? I'm stumped on that one. 
> > thanks, 
> > Lisa 
> > 
> > 
> > -------------- Original message from Marc Guillemot 
> > : -------------- 
> > 
> > 
> >> Hi Lisa, 
> >> 
> >> in $WebtestHome/lib/log4j.properties try adding: 
> >> 
> >> log4j.logger.com.gargoylesoftware.htmlunit.javascript=debug 
> >> 
> >> Marc. 
> >> 
> >> Lisa Crispin wrote: 
> >> > Hi, 
> >> > We got a popup calendar that HtmlUnit likes, so it's on to the next 
> >> > problem. 
> >> > 
> >> > The doc for HtmlUnit states: "A custom logger has been added to 
> >> > HtmlUnit to support this. If you set 
> >> > 'com.gargoylesoftware.htmlunit.javascript' to debug level, the inline 
> >> > code will be logged with the wrapper function to help you determine 
> >> > what 
> >> > line of code is failing." 
> >> > 
> >> > Is there a way to set this in WebTest so we can figure out why our 
> >> > Javascript is failing with HtmlUnit? 
> >> > Thanks, 
> >> > Lisa 
> >> 
> >> _______________________________________________ 
> >> 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_15196_1100135955_0
Content-Type: text/html
Content-Transfer-Encoding: 8bit

<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>Thank you, Jeff.&nbsp; Indeed, we were using a very old and outdated way of setting focus in Javascript, it must have only been supported in IE 4 or something.&nbsp; (The fact that there is a 1998 version of a Javascript book on the programmer's desk gave us&nbsp;a clue).&nbsp; One of the programmers here has updated that and it fixed this problem.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Now just have to get past that pesky Clickbutton problem and we might be able to use this cool new WebTest based on HtmlUnit!</DIV>
<DIV>-- Lisa</DIV><BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message from "Jeff Nielsen" &lt;jeff.nielsen@digitalfocus.com&gt;: -------------- <BR><BR><BR>&gt; Check that the Javascript you show below is "standard" javascript that Rhino <BR>&gt; understands. We have had several problems with HtmlUnit/Rhino where we were <BR>&gt; using IE-specific Javascript in our pages. This fact didn't come to light <BR>&gt; until we started running the functional tests. <BR>&gt; <BR>&gt; <BR>&gt; -- <BR>&gt; Jeff Nielsen <BR>&gt; Chief Scientist, Digital Focus <BR>&gt; www.digitalfocus.com <BR>&gt; <BR>&gt; ----- Original Message ----- <BR>&gt; From: "Lisa Crispin" <LISA.CRISPIN@ATT.NET><BR>&gt; To: <WEBTEST@LISTS.CANOO.COM><BR>&gt; Sent: Wednesday, November 10, 2004 1:28 PM <BR>&gt; Subject: Re: [Webtest] Debug output from HtmlUnit <BR>&gt; <BR>&gt; <BR>&gt; &gt; Thanks, we did figure out this particular problem, although not from the <BR>&gt; &gt; debug. In case anyone else has this problem, here it is. We had what may <BR>&gt; &gt; be considered a hack to put the tab focus in the right text box. <BR>&gt; &gt;
<SCRIPT> document.forms["searchByName"].lastName.focus() </SCRIPT>
 <BR>&gt; &gt; <BR>&gt; &gt; HtmlUnit doesn't like this when it goes to invoke the page. <BR>&gt; &gt; <BR>&gt; &gt; We can't seem to get the focus set any other way (I don't know the <BR>&gt; &gt; particulars) so we are going to set a flag to remove this bit of <BR>&gt; &gt; Javascript for running tests. <BR>&gt; &gt; <BR>&gt; &gt; Does anyone have any ideas on my other post - about the clickbutton not <BR>&gt; &gt; working in the new WebTest? I'm stumped on that one. <BR>&gt; &gt; thanks, <BR>&gt; &gt; Lisa <BR>&gt; &gt; <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;&gt; Hi Lisa, <BR>&gt; &gt;&gt; <BR>&gt; &gt;&gt; in $WebtestHome/lib/log4j.properties try adding: <BR>&gt; &gt;&gt; <BR>&gt; &gt;&gt; log4j.logger.com.gargoylesoftware.htmlunit.javascript=debug <BR>&gt; &gt;&gt; <BR>&gt; &gt;&gt; Marc. <BR>&gt; &gt;&gt; <BR>&gt; &gt;&gt; Lisa Crispin wrote: <BR>&gt; &gt;&gt; &gt; Hi, <BR>&gt; &gt;&gt; &gt; We got a popup calendar that HtmlUnit likes, so it's on to the next <BR>&gt; &gt;&gt; &gt; problem. <BR>&gt; &gt;&gt; &gt; <BR>&gt; &gt;&gt; &gt; The doc for HtmlUnit states: "A custom logger has been added to <BR>&gt; &gt;&gt; &gt; HtmlUnit to support this. If you set <BR>&gt; &gt;&gt; &gt; 'com.gargoylesoftware.htmlunit.javascript' to debug level, the inline <BR>&gt; &gt;&gt; &gt; code will be logged with the wrapper function to help you determine <BR>&gt; &gt;&gt; &gt; what <BR>&gt; &gt;&gt; &gt; line of code is failing." <BR>&gt; &gt;&gt; &gt; <BR>&gt; &gt;&gt; &gt; Is there a way to set this in WebTest so we can figure out why our <BR>&gt; &gt;&gt; &gt; Javascript is failing with HtmlUnit? <BR>&gt; &gt;&gt; &gt; Thanks, <BR>&gt; &gt;&gt; &gt; Lisa <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; <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_15196_1100135955_0--