Hi All,
Can any one help me in passing parameters between two
xml files.
With the following script(Script a1 is xml file1 and Script b1 is xml file 2):
Script a1:
<target name="main1">
<webtest name="a1">
<steps>
<scriptStep description="to check alphabets" language="groovy">
n1="${n}";
p = n1.length()
println("====>>"+p);
if(p>8)
{
println("invalid length")
}
else
{
println("one == passed")
theRegularExpression = /([a-z])/
if (n1 =~theRegularExpression)
{
step.setWebtestProperty('a', n1);
}
else
{
println("one == Failed");
}
}
</scriptStep>
Script b1:
<project name="SimpleTest" basedir="." >
<property name="webtest.home" location="C:/Program Files/webtest" />
<import file="${webtest.home}/lib/taskdef.xml"/>
<ant antfile="f1.xml" dir="." inheritrefs="true" target="main">
<property name="webtest.connectioninitializer"
value="com.canoo.webtest.security.SunJsseBaseConnectionInitializer" />
<property name="webtest.truststore.file" value="C:\Program
Files\Java\jdk1.6.0_03\jre\lib\security\cacerts" />
<property name="webtest.truststore.passphrase" value="changeit" />
<property name="n" value="wwwww"/>
<!-- <property name="a" value="TEST2222"/> -->
</ant>
<target name="main">
<webtest name="b1">
<config
host="ddddd.net"
protocol="https"
>
<header name="User-Agent" value="Mozilla/4.0"/>
<header name="Accept-Language" value="de-ch"/>
<option name="ThrowExceptionOnScriptError" value="false"/>
<option name="JavaScriptEnabled" value="true"/>
</config>
<steps>
<storeProperty
description="convert Ant to dynamic"
name="a"
value="${n}"/>
<setInputField name="name.given" value="#{a}"/>
<echo message="#{a}"/>
</steps>
</webtest>
</target>
</project>
Here am trying to call parameters from "a1" in to "b1"
script,by doing so,b1 is not getting executed.
Thanks in Advance
Lavanya
Connect with friends all over the world. Get Yahoo! India Messenger at
http://in.messenger.yahoo.com/?wm=n/