[Webtest] [webtest][JIRA] Created: (WT-62) Save all files which webtest are evaluated

Serge Maslyukov (JIRA) webtest@lists.canoo.com
Thu, 7 Jul 2005 16:19:51 +0200 (CEST)


Save all files which webtest are evaluated
------------------------------------------

         Key: WT-62
         URL: http://webtest-community.canoo.com/jira/browse/WT-62
     Project: WebTest
        Type: New Feature
    Versions: 1.7-SNAPSHOT    
    Reporter: Serge Maslyukov


Save all files which webtest are evaluated.

My web-page have a lot of javascript. And if I use webtest for processing it, I have error:

ERROR (com.canoo.webtest.steps.request.ClickButton) - Class name of error: com.gargoylesoftware.htmlunit.ScriptException
ERROR (com.canoo.webtest.steps.request.ClickButton) - Class name of enclosed error: org.mozilla.javascript.EcmaError
ERROR (com.canoo.webtest.steps.request.ClickButton) - details: TypeError: Cannot set property "href" of null to "/wps/myportal/!ut/p/_s.7_0_A/7_0_6Q/.cmd/ad/.ar/sa.createQuestion/.c/6_0_46/.ce/7_0_2B1/.p/5_0_24P/.d/4?PC_7_0_2B1_bcpUnique=5#7_0_2B1"
ERROR (com.canoo.webtest.steps.request.ClickButton) - line number: 1
ERROR (com.canoo.webtest.steps.request.ClickButton) - name: TypeError
ERROR (com.canoo.webtest.steps.request.ClickButton) - line source: null
ERROR (com.canoo.webtest.steps.request.ClickButton) - source name: event for HtmlButton[<button onclick="location.href='/wps/myportal/!ut/p/_s.7_0_A/7_0_6Q/.cmd/ad/.ar/sa.createQuestion/.c/6_0_46/.ce/7_0_2B1/.p/5_0_24P/.d/4?PC_7_0_2B1_bcpUnique=5#7_0_2B1'" title="Add New Question" type="button" id="Add New Question" class="wpsButtonText">]
ERROR (com.canoo.webtest.steps.request.ClickButton) - toString(): org.mozilla.javascript.EcmaError: TypeError: Cannot set property "href" of null to "/wps/myportal/!ut/p/_s.7_0_A/7_0_6Q/.cmd/ad/.ar/sa.createQuestion/.c/6_0_46/.ce/7_0_2B1/.p/5_0_24P/.d/4?PC_7_0_2B1_bcpUnique=5#7_0_2B1" (event for HtmlButton[<button onclick="location.href='/wps/myportal/!ut/p/_s.7_0_A/7_0_6Q/.cmd/ad/.ar/sa.createQuestion/.c/6_0_46/.ce/7_0_2B1/.p/5_0_24P/.d/4?PC_7_0_2B1_bcpUnique=5#7_0_2B1'" title="Add New Question" type="button" id="Add New Question" class="wpsButtonText">]#1)
ERROR (com.canoo.webtest.steps.request.ClickButton) - EcmaError
org.mozilla.javascript.EcmaError: TypeError: Cannot set property "href" of null to "/wps/myportal/!ut/p/_s.7_0_A/7_0_6Q/.cmd/ad/.ar/sa.createQuestion/.c/6_0_46/.ce/7_0_2B1/.p/5_0_24P/.d/4?PC_7_0_2B1_bcpUnique=5#7_0_2B1" (event for HtmlButton[<button onclick="location.href='/wps/myportal/!ut/p/_s.7_0_A/7_0_6Q/.cmd/ad/.ar/sa.createQuestion/.c/6_0_46/.ce/7_0_2B1/.p/5_0_24P/.d/4?PC_7_0_2B1_bcpUnique=5#7_0_2B1'" title="Add New Question" type="button" id="Add New Question" class="wpsButtonText">]#1)
	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3237)
	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3227)
	at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3243)
	at org.mozilla.javascript.ScriptRuntime.typeError3(ScriptRuntime.java:3269)
	at org.mozilla.javascript.ScriptRuntime.undefWriteError(ScriptRuntime.java:3291)
	at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1427)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2871)
	at script(event for HtmlButton[<button onclick="location.href='/wps/myportal/!ut/p/_s.7_0_A/7_0_6Q/.cmd/ad/.ar/sa.createQuestion/.c/6_0_46/.ce/7_0_2B1/.p/5_0_24P/.d/4?PC_7_0_2B1_bcpUnique=5#7_0_2B1'" title="Add New Question" type="button" id="Add New Question" class="wpsButtonText">]:1)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2271)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:147)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2766)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:145)
	at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:88)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:299)
	at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:758)
	at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:111)
	at com.canoo.webtest.steps.request.ClickButton$1.call(ClickButton.java:332)
	at com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:99)
	at com.canoo.webtest.steps.request.ClickButton.gotoTarget(ClickButton.java:317)
	at com.canoo.webtest.steps.request.ClickButton.doExecute(ClickButton.java:145)
	at com.canoo.webtest.steps.Step.execute(Step.java:89)
	at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:31)
	at com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:78)


For search error, I manualy invoke and save html page and all corresponding javascript files. But when I try emulate click on this saved page all work fine.
I try pure HtmlUnit test case and webtest case with tomcat (original webserver - WebSphere)

My RFE is save all files which webtest processed. I my scase there are javascript files.

For example:
resultpath="c:\result"

Html page contain links to javascript:
<script type="text/javascript" src="/wps/themes/html/BCPTheme/calendar.js"></script>
<script type="text/javascript" src="/wps/themes/html/BCPTheme/calendar-en.js"></script>
<script type="text/javascript" src="/wps/themes/html/BCPTheme/calendar-setup.js"></script>

webtest must create dir c:\result/wps/themes/html/BCPTheme/ and save to this dir all javascript files.









-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira