3 messages in com.canoo.lists.webtest[Webtest] ERROR (com.gargoylesoftware...
FromSent OnAttachments
dav26 Jun 2007 03:30 
Dierk Koenig26 Jun 2007 04:36 
Marc Guillemot02 Jul 2007 02:34 
Subject:[Webtest] ERROR (com.gargoylesoftware.htmlunit.ScriptEngine) - runtimeError
From:dav (da@nnx.com)
Date:06/26/2007 03:30:58 AM
List:com.canoo.lists.webtest

Hi,

I'm learning about to use webTest/Canoo, and I've wrote this test :

<config host="www.google.fr" port="80" protocol="http" basepath="" summary="true" saveresponse="${wt.saveresponse}" haltonfailure="false" showhtmlparseroutput="false" resultfile="${wt.resultfile}" resultpath="${wt.resultpath}"> <header name="User-Agent" value=""/> </config>

----

<?xml version="1.0" encoding="LATIN1"?>

<!DOCTYPE project [ <!ENTITY config SYSTEM "config.xml"> ]>

<project name="google.fr" basedir="." default="createReport">

<property name="wt.home" location="/opt/canoo" /> <property name="wt.resultpath" location="/path/to/myWork" /> <property name="wt.resultfile" value="result.xml" /> <property name="wt.saveresponse" value="true" />

<taskdef file="${wt.home}/webtestTaskdefs.properties"> <classpath> <pathelement path="${wt.home}/lib"/> <fileset dir="${wt.home}" includes="deploy/clover/*.jar"/> <fileset dir="${wt.home}" includes="lib/*.jar"/> <fileset dir="${wt.home}" includes="lib/base/*.jar"/> <fileset dir="${wt.home}" includes="lib/optional/*.jar"/> <fileset dir="${wt.home}" includes="lib/runtime/*.jar"/> <fileset dir="${wt.home}" includes="lib/plugins/*.jar"/> <fileset dir="${wt.home}" includes="lib/plugins/pdftest/*.jar"/> </classpath> </taskdef>

<import file="${wt.home}/webtest.xml" description="Import all functionalities for a full build"/> <import file="${wt.home}/lib/useWebTest.xml" description="Apply XSLT transformation and create HTML report"/>

<target name="allTests"> <webtest name="Invoking /"> &config; <steps> <!-- Invoking / --> <invoke description="Follow link /" url="/" />

<!-- Invoking /ncr --> <clickLink description="Follow link /ncr" href="http://www.google.com/ncr" />

<!-- Submitting form "/search" using method "GET" --> <forceHiddenInputField description="Fixe &quot;hl&quot; a &quot;en&quot;" name="hl" value="en" /> <forceHiddenInputField description="Fixe &quot;ie&quot; a &quot;ISO-8859-1&quot;" name="ie" value="ISO-8859-1" /> <setInputField description="Fixe &quot;q&quot; a &quot;flo&quot;" name="q" value="test" /> <clickButton description="Soumission du formulaire avec &quot;Google+Search&quot; (btnG)" name="btnG"/>

<!-- Invoking / --> <clickLink description="Follow link /" href="/" />

<!-- Submitting form "/search" using method "GET" --> <setInputField description="Fixe &quot;q&quot; a &quot;flo&quot;" name="q" value="flo" /> <forceHiddenInputField description="Fixe &quot;ie&quot; a &quot;ISO-8859-1&quot;" name="ie" value="ISO-8859-1" /> <forceHiddenInputField description="Fixe &quot;hl&quot; a &quot;en&quot;" name="hl" value="en" /> <clickButton description="Soumission du formulaire avec &quot;I%27m+Feeling+Lucky&quot; (btnI)" name="btnI"/> </steps> </webtest> </target>

<target name="createReport" depends="allTests"> [...] </target>

</project>

----

But when running this script, webTest log on console :

$ /opt/canoo/bin/webtest.sh -f tests.xml Will use java Buildfile: tests.xml

allTests: [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Starting webtest "Invoking /" (tests.xml:33: ) [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest: R_1580. [config] INFO (com.canoo.webtest.engine.Configuration) - Using browser version (Microsoft Internet Explorer, 4.0 (compatible; MSIE 6.0b; Windows 98), , 1.2, 6.0). If the javascript support is not as expected, then it's time to go into the sources [config] INFO (com.canoo.webtest.engine.Configuration) - Configuring 1 HTTP header field(s) [config] INFO (com.canoo.webtest.engine.Configuration) - Skipped User-Agent header as it has already been configured in the BrowserVersion [steps] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: steps (1/11) [invoke] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: invoke "Follow link /" (1/11) [...] [clickLink] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: clickLink "Follow link /" (7/11) [clickLink] INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - -> gotoTarget by clickLink [clickLink] ERROR (com.gargoylesoftware.htmlunit.ScriptEngine) - runtimeError: message=[ActiveXObject Error: no value for MSXML2.XMLHTTP.6.0.] sourceName=[Embedded script in http://images.google.com/images?um=1&t [clickLink] ab=wi&hl=en&ie=ISO-8859-1&q=flo from (32, 9) to (0, 0)] line=[2] lineSource=[null] lineOffset=[0] [clickLink] ERROR (com.gargoylesoftware.htmlunit.ScriptEngine) - runtimeError: message=[ActiveXObject Error: no value for MSXML2.XMLHTTP.3.0.] sourceName=[Embedded script in http://images.google.com/images?um=1&t [clickLink] ab=wi&hl=en&ie=ISO-8859-1&q=flo from (32, 9) to (0, 0)] line=[2] lineSource=[null] lineOffset=[0] [clickLink] ERROR (com.gargoylesoftware.htmlunit.ScriptEngine) - runtimeError: message=[ActiveXObject Error: no value for MSXML2.XMLHTTP.] sourceName=[Embedded script in http://images.google.com/images?um=1&tab=w [clickLink] i&hl=en&ie=ISO-8859-1&q=flo from (32, 9) to (0, 0)] line=[2] lineSource=[null] lineOffset=[0]

Does anybody knows why, and better, how to deal with this runtimeError ?!

PS: I'd like to keep user-agent unset if possible...

david. --