[Webtest] Question on JS function loading...

Marc Guillemot webtest@lists.canoo.com
Thu, 15 Jun 2006 21:05:50 +0200


Hi Colin,

except a missing declaration of the is_ns_4, the script loads fine and
doesn't cause any problem.

Sadly the information you provide don't allow to find the cause of the
problem:
- the "No configured setter" and "not defined as fixed property"
messages are fully normal debug information concerning the way htmlunit
work and don't show any problem
- all the GargoyleWrapperXxx are a consequence of the setInterval and as
it normal as well

Before investigating further, can you get htmlunit from its CVS
repository, build the jar and use it? Some changes have been made in
setTimeOut and setInterval handling since release 1.8 and they may
already solve your problem.

Marc.

Colin O'Brien wrote:
> Hi All,
> 
>  
> 
> N.B.: logLevel.htmlunit=debug
> 
>  
> 
> I’m having trouble executing some of my WebTests for a product that is
> wrapped inside the ‘Liferay’ content management system. When I have
> JavaScript enabled it takes between 15 – 20 minutes to complete one
> test, I have reported this in the past but was unable to provide enough
> information about the root cause. I have pieced together a mini WebTest,
> which goes some of the way to reproducing the issue.
> 
>  
> 
> When I run the test, WebTest complains that there is no setter
> configured for each of the functions in the included .js (util.js in the
> attached .zip), there are many included .js files and many functions, so
> it takes WebTest some time to parse all of them.
> 
> ******************************************
> 
>    [invoke] DEBUG (com.gargoylesoftware.htmlunit.javascript.host.Window)
> - No configured setter "blink" found for
> com.gargoylesoftware.htmlunit.javascript.host.Window@1d0d45b. Setting it
> as pure javascript property.
> 
> ******************************************
> 
>  
> 
>  
> 
> The parsing of the functions in the included .js files is not the most
> time consuming activity, when I run the a test against the real
> application the following appears in the log continuously
> 
> ******************************************
> 
>    [invoke] DEBUG
> (com.gargoylesoftware.htmlunit.javascript.host.HTMLElement) - No
> configured setter "GargoyleWrapper0" found for HTMLElement for
> HtmlHtml[<html>]. Setting it as pure javascript property.
> 
>    [invoke] DEBUG
> (com.gargoylesoftware.htmlunit.javascript.host.HTMLElement) - Property
> "blink" of HTMLElement for HtmlHtml[<html>] not defined as fixed property
> 
>    [invoke] DEBUG
> (com.gargoylesoftware.htmlunit.javascript.ElementArray) - Property
> "tags" of
> com.gargoylesoftware.htmlunit.javascript.ElementArray@18e609b<//*> not
> defined as pure js property
> 
>    [invoke] DEBUG
> (com.gargoylesoftware.htmlunit.javascript.ElementArray) - Property
> "length" of
> com.gargoylesoftware.htmlunit.javascript.ElementArray@2bccb2<//*[name()
> = 'blink']> not defined as pure js property
> 
>    [invoke] DEBUG
> (com.gargoylesoftware.htmlunit.javascript.host.JavaScriptBackgroundJob)
> - Executing JavaScriptBackgroundJob: blink()
> 
>    [invoke] DEBUG (com.gargoylesoftware.htmlunit.javascript) - Now build
> JS function
> 
>    [invoke] function GargoyleWrapper1() {blink()
> 
>    [invoke] }
> 
> ******************************************
> 
>  
> 
>  
> 
> It goes through this 1064 times incrementing for each instance of
> ‘invoke’, ‘SetSelectField’ and ‘clickLink’ in the Webtest, that is, each
> time a new page loads it goes through the process again…
> 
> ******************************************
> 
>  
> 
> [invoke] function GargoyleWrapper1() {blink()
> 
>> 
> [invoke] function GargoyleWrapper353() {blink()
> 
>> 
> [setSelectField] function GargoyleWrapper354() {blink()
> 
>> 
> [setSelectField] function GargoyleWrapper708() {blink()
> 
>> 
> [clickLink] function GargoyleWrapper709() {blink()
> 
>> 
> [clickLink] function GargoyleWrapper1064() {blink()
> 
> ******************************************
> 
>  
> 
>  
> 
> The offending .js function
> 
> ******************************************
> 
> function blink() {
> 
>        if (document.all) {
> 
>               var blinkArray = document.all.tags("blink");
> 
>  
> 
>               for (var i = 0; i < blinkArray.length; i++) {
> 
>                      blinkArray[i].style.visibility =
> blinkArray[i].style.visibility == "" ? "hidden" : "";
> 
>               }
> 
>        }
> 
> }
> 
> ******************************************
> 
>  
> 
> So as I said the mini test only show the complaints about no setters
> configured for the functions in the .js, it is only when I run it
> against the real application I see the second message continuously, has
> anyone experienced something similar and corrected the issue, or is this
> something that has to be accepted…? Using IE the pages load in ~10
> seconds or so, in WebTest it takes several minutes to load a page with
> the included .js.
> 
>  
> 
> Regards,
> 
> Colin.
> 
> *_________________________________________*
> 
> *Colin O’Brien*
> 
> *QA Manager*
> 
> * *
> 
> *CAPE Technologies,*
> 
> *Maple House, Temple Road, Blackrock, Co. Dublin*
> 
> * *
> 
> *e: colin.obrien@capetechnologies.com***
> 
> *p: +353 1 4003 900*
> 
> *f: +353 1 4003 901*
> 
> *w: http://www.capetechnologies.com*
> 
> *_________________________________________*
> 
>  
>