[Webtest] passing parameters between two xml files

Soula, William Soula, William" <wsoula@pointserve.com
Fri, 19 Sep 2008 06:58:38 -0500


--_000_93B3B6122B906D44BC7E8B8CEFB0DBBB184529EBA7SGPEXCHANGEpo_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

File 1
<storeProperty property=3D"stop" value=3D"sending this email"/>
<echo file=3D"debug.out" message=3D"annoying=3D#{stop}"/>

File 2
<property file=3D"debug.out"/>
<echo message=3D"${annoying}"/>

If this doesn't help please do some research on your own about ant and prop=
erty files -> http://ant.apache.org/manual/CoreTasks/property.html

________________________________
From: lavanya palaniswamy [mailto:lavan.swamy@yahoo.co.in]
Sent: Friday, September 19, 2008 12:00 AM
To: webtest@lists.canoo.com
Cc: Soula, William
Subject: RE: [Webtest] passing parameters between two xml files



---










Hi Soula,
Thanks for your reply.
I am not particular about groovy.
U can also explain me with javascript.

A1.xml(file1)
<scriptStep description=3D"to check alphabets" language=3D"javascript">
 n1=3D"Hello";

  step.setWebtestProperty('a', n1);

</scriptStep>
<echo message=3D"#{a}"/>

A2.xml (file2)
<project name=3D"SimpleTest" basedir=3D"." default=3D"main4" >
  <property name=3D"webtest.home" location=3D"C:/Program Files/webtest" />
  <import file=3D"${webtest.home}/lib/taskdef.xml"/>

  <property name=3D"webtest.connectioninitializer" value=3D"com.canoo.webte=
st.security.SunJsseBaseConnectionInitializer" />
  <property name=3D"webtest.truststore.file" value=3D"C:\Program Files\Java=
\jdk1.6.0_03\jre\lib\security\cacerts" />
  <property name=3D"webtest.truststore.passphrase" value=3D"changeit" />
  <import file=3D"C:\Program Files\webtest\functions\A1.xml" description=3D=
"Import all functionalities for a full build"/>
  <target name=3D"main4" depends=3D"main1">
 <webtest name=3D"c2">
    <config
        host=3D"abc.net"
         protocol=3D"https"
              >
    <header name=3D"User-Agent" value=3D"Mozilla/4.0"/>
    <header name=3D"Accept-Language" value=3D"de-ch"/>

    <option name=3D"ThrowExceptionOnScriptError" value=3D"false"/>
  <option name=3D"JavaScriptEnabled" value=3D"true"/>
  </config>

   <steps>

     <echo message=3D"#{a}"/>

</steps>
</webtest>

    </target>
</project>

On executing File2, file 1(A1.xml) adn File 2(A2.xml)
gets executed seperately.No link between file 1 and File 2.So the result fo=
r File 2 is
Output:
#{a}
instead of "Hello".
Please help me on how to pass values from one Xml file to another.
Thanks in Advance
Lavanya











--- On Thu, 11/9/08, Soula, William <wsoula@pointserve.com> wrote:
From: Soula, William <wsoula@pointserve.com>
Subject: RE: [Webtest] passing parameters between two xml files
To: "webtest@lists.canoo.com" <webtest@lists.canoo.com>
Date: Thursday, 11 September, 2008, 8:30 PM

I was thinking along the lines of this:
file 1:
<storeProperty property=3D"movie" value=3D"23"/>
<echo message=3D"movie=3D#{movie}" file=3D"output.txt"/>

file2:
<property file=3D"output.txt"/>
<echo message=3D"${movie}"/>

Something like that should be what you want, you could also use concat.  If=
 you want to use groovy to output to the file you can do something like bel=
ow (I don't really know groovy, sorry :)
<script language=3D"groovy">
    println("movie=3D#{movie}")
</script>


________________________________
From: lavanya palaniswamy [mailto:lavan.swamy@yahoo.co.in]
Sent: Thursday, September 11, 2008 7:14 AM
To: Soula, William
Cc: webtest@lists.canoo.com
Subject: RE: [Webtest] passing parameters between two xml files

Hi Soula,
Thanks for replying.
I am not able to pass parameters within two Xml files.
So i tried converting groovy variable to ant and then pass.
But this is not working.
As per solution passing values from main script to temp script again
means passing variables between two xml files.
Please help me with the solution other than this conversion from groovy to =
ant and
passing the values.
Thanks in advance
Lavanya







--- On Thu, 11/9/08, Soula, William <wsoula@pointserve.com> wrote:
From: Soula, William <wsoula@pointserve.com>
Subject: RE: [Webtest] passing parameters between two xml files
To: "webtest@lists.canoo.com" <webtest@lists.canoo.com>
Date: Thursday, 11 September, 2008, 5:20 PM

Could you output the property to a temp property file and then read it in w=
ith the other script?

________________________________
From: webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com] =
On Behalf Of lavanya palaniswamy
Sent: Thursday, September 11, 2008 6:25 AM
To: webtest@lists.canoo.com
Subject: [Webtest] passing parameters between two xml files

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=3D"main1">
    <webtest name=3D"a1">

      <steps>

<scriptStep description=3D"to check alphabets" language=3D"groovy">
 n1=3D"${n}";

  p =3D n1.length()

  println("=3D=3D=3D=3D>>"+p);
if(p>8)
 {
println("invalid length")
}

else
{
println("one =3D=3D passed")
    theRegularExpression =3D /([a-z])/

  if (n1 =3D~theRegularExpression)

  {
  step.setWebtestProperty('a', n1);
  }
 else
 {
println("one =3D=3D Failed");
}

}
</scriptStep>

________________________________


Script b1:
<project name=3D"SimpleTest" basedir=3D"." >
  <property name=3D"webtest.home" location=3D"C:/Program Files/webtest" />
  <import file=3D"${webtest.home}/lib/taskdef.xml"/>
   <ant antfile=3D"f1.xml" dir=3D"." inheritrefs=3D"true" target=3D"main">
  <property name=3D"webtest.connectioninitializer" value=3D"com.canoo.webte=
st.security.SunJsseBaseConnectionInitializer" />
  <property name=3D"webtest.truststore.file" value=3D"C:\Program Files\Java=
\jdk1.6.0_03\jre\lib\security\cacerts" />
  <property name=3D"webtest.truststore.passphrase" value=3D"changeit" />


    <property name=3D"n" value=3D"wwwww"/>
   <!-- <property name=3D"a" value=3D"TEST2222"/> -->
  </ant>
  <target name=3D"main">
    <webtest name=3D"b1">
    <config
        host=3D"ddddd.net"
         protocol=3D"https"
              >
    <header name=3D"User-Agent" value=3D"Mozilla/4.0"/>
    <header name=3D"Accept-Language" value=3D"de-ch"/>

    <option name=3D"ThrowExceptionOnScriptError" value=3D"false"/>
  <option name=3D"JavaScriptEnabled" value=3D"true"/>

  </config>
   <steps>
      <storeProperty
        description=3D"convert Ant to dynamic"
        name=3D"a"
        value=3D"${n}"/>
<setInputField name=3D"name.given" value=3D"#{a}"/>
<echo message=3D"#{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



________________________________
Did you know? You can CHAT without downloading messenger. Click here<http:/=
/in.rd.yahoo.com/tagline_webmessenger_2/*http://in.webmessenger.yahoo.com/>


________________________________
Unlimited freedom, unlimited storage. Get it now<http://in.rd.yahoo.com/tag=
line_mail_2/*http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08=
.html/>


________________________________
Connect with friends all over the world. Get Yahoo! India Messenger.<http:/=
/in.rd.yahoo.com/tagline_messenger_1/*http://in.messenger.yahoo.com/?wm=3Dn=
/>


________________________________
Unlimited freedom, unlimited storage. Get it now<http://in.rd.yahoo.com/tag=
line_mail_2/*http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08=
.html/>


________________________________
________________________________
Unlimited freedom, unlimited storage. Get it now<http://in.rd.yahoo.com/tag=
line_mail_2/*http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08=
.html/>

--_000_93B3B6122B906D44BC7E8B8CEFB0DBBB184529EBA7SGPEXCHANGEpo_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dus-ascii" http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18241"></HEAD>
<BODY>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D501394911-19092008><FONT color=3D=
#0000ff=20
size=3D2 face=3DArial>File 1</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D501394911-19092008><FONT color=3D=
#0000ff=20
size=3D2 face=3DArial>&lt;storeProperty property=3D"stop" value=3D"sending =
this=20
email"/&gt;</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D501394911-19092008><FONT color=3D=
#0000ff=20
size=3D2 face=3DArial>&lt;echo file=3D"debug.out"=20
message=3D"annoying=3D#{stop}"/&gt;</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D501394911-19092008><FONT color=3D=
#0000ff=20
size=3D2 face=3DArial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D501394911-19092008><FONT color=3D=
#0000ff=20
size=3D2 face=3DArial>File 2</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D501394911-19092008><FONT color=3D=
#0000ff=20
size=3D2 face=3DArial>&lt;property file=3D"debug.out"/&gt;</FONT></SPAN></D=
IV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D501394911-19092008><FONT color=3D=
#0000ff=20
size=3D2 face=3DArial>&lt;echo message=3D"${annoying}"/&gt;</FONT></SPAN></=
DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D501394911-19092008><FONT color=3D=
#0000ff=20
size=3D2 face=3DArial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D501394911-19092008><FONT color=3D=
#0000ff=20
size=3D2 face=3DArial>If this doesn't help please do some research on your =
own about=20
ant and property files -&gt; <A=20
href=3D"http://ant.apache.org/manual/CoreTasks/property.html">http://ant.ap=
ache.org/manual/CoreTasks/property.html</A></FONT></SPAN></DIV><BR>
<DIV dir=3Dltr lang=3Den-us class=3DOutlookMessageHeader align=3Dleft>
<HR tabIndex=3D-1>
<FONT size=3D2 face=3DTahoma><B>From:</B> lavanya palaniswamy=20
[mailto:lavan.swamy@yahoo.co.in] <BR><B>Sent:</B> Friday, September 19, 200=
8=20
12:00 AM<BR><B>To:</B> webtest@lists.canoo.com<BR><B>Cc:</B> Soula,=20
William<BR><B>Subject:</B> RE: [Webtest] passing parameters between two xml=
=20
files<BR></FONT><BR></DIV>
<DIV></DIV>
<TABLE border=3D0 cellSpacing=3D0 cellPadding=3D0>
  <TBODY>
  <TR>
    <TD vAlign=3Dtop><BR><BR>---
      <BLOCKQUOTE=20
      style=3D"BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MA=
RGIN-LEFT: 5px"><BR><BR>
        <DIV id=3Dyiv1294243923>
        <TABLE border=3D0 cellSpacing=3D0 cellPadding=3D0>
          <TBODY>
          <TR>
            <TD=20
            style=3D"FONT-FAMILY: inherit; font-size-adjust: inherit; font-=
stretch: inherit"=20
            vAlign=3Dtop><BR><BR><BR>
              <BLOCKQUOTE=20
              style=3D"BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT:=
 5px; MARGIN-LEFT: 5px"><BR>
                <DIV id=3Dyiv1841398418>
                <TABLE border=3D0 cellSpacing=3D0 cellPadding=3D0>
                  <TBODY>
                  <TR>
                    <TD=20
                    style=3D"FONT-FAMILY: inherit; font-size-adjust: inheri=
t; font-stretch: inherit"=20
                    vAlign=3Dtop>
                      <DIV><BR>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>Hi Soula,<BR>Thanks for your reply.<BR>I am not=
=20
                      particular about groovy.<BR>U&nbsp;can also&nbsp;expl=
ain=20
                      me with javascript.</DIV>
                      <DIV><BR><FONT=20
                      color=3D#7f003f><STRONG>A1.xml(file1)</STRONG><BR></F=
ONT>&lt;scriptStep=20
                      description=3D"to check alphabets"=20
                      language=3D"javascript"&gt;<BR>&nbsp;n1=3D"Hello";</D=
IV>
                      <DIV> <BR>&nbsp; step.setWebtestProperty('a',=20
                      n1);<BR>&nbsp; <BR>&lt;/scriptStep&gt;<BR>&lt;echo=20
                      message=3D"#{a}"/&gt;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV><STRONG><FONT color=3D#800000>A2.xml=20
                      (file2)</FONT></STRONG></DIV>
                      <DIV>&lt;project name=3D"SimpleTest" basedir=3D"."=20
                      default=3D"main4" &gt;<BR>&nbsp; &lt;property=20
                      name=3D"webtest.home" location=3D"C:/Program Files/we=
btest"=20
                      /&gt;<BR>&nbsp; &lt;import=20
                      file=3D"${webtest.home}/lib/taskdef.xml"/&gt;<BR>&nbs=
p;=20
                      <BR>&nbsp; &lt;property=20
                      name=3D"webtest.connectioninitializer"=20
                      value=3D"com.canoo.webtest.security.SunJsseBaseConnec=
tionInitializer"=20
                      /&gt;<BR>&nbsp; &lt;property=20
                      name=3D"webtest.truststore.file" value=3D"C:\Program=
=20
                      Files\Java\jdk1.6.0_03\jre\lib\security\cacerts" /&gt=
;=20
                      <BR>&nbsp; &lt;property=20
                      name=3D"webtest.truststore.passphrase" value=3D"chang=
eit"=20
                      /&gt;<BR>&nbsp;<FONT color=3D#0000bf> &lt;import=20
                      file=3D"C:\Program Files\webtest\functions\A1.xml"=20
                      description=3D"Import all functionalities for a full=
=20
                      build"/&gt;<BR></FONT>&nbsp; &lt;target name=3D"main4=
"=20
                      depends=3D"main1"&gt;<BR>&nbsp;&lt;webtest=20
                      name=3D"c2"&gt;<BR>&nbsp;&nbsp;&nbsp;=20
                      &lt;config<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;=20
                      host=3D"abc.net"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;=20
                      protocol=3D"https"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
                      &gt;<BR>&nbsp;&nbsp;&nbsp; &lt;header name=3D"User-Ag=
ent"=20
                      value=3D"Mozilla/4.0"/&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;=
header=20
                      name=3D"Accept-Language"=20
                      value=3D"de-ch"/&gt;<BR>&nbsp;&nbsp;&nbsp;=20
                      <BR>&nbsp;&nbsp;&nbsp; &lt;option=20
                      name=3D"ThrowExceptionOnScriptError"=20
                      value=3D"false"/&gt;<BR>&nbsp; &lt;option=20
                      name=3D"JavaScriptEnabled" value=3D"true"/&gt;</DIV>
                      <DIV>&nbsp;=20
                      &lt;/config&gt;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;=
&nbsp;&lt;steps&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
                      <BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;echo=20
                      message=3D"#{a}"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
                      <BR>&lt;/steps&gt;</DIV>
                      <DIV>&lt;/webtest&gt;</DIV>
                      <DIV>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;=20
                      &lt;/target&gt; </DIV>
                      <DIV>&lt;/project&gt;</DIV>
                      <DIV><BR>On executing File2, file 1(A1.xml) adn File=
=20
                      2(A2.xml)<BR>gets executed seperately.No link between=
 file=20
                      1 and File 2.So the result for File 2 is<BR><STRONG><=
FONT=20
                      color=3D#800000>Output:</FONT></STRONG><BR>#{a}<BR>in=
stead=20
                      of "Hello".<BR>Please help me on how to pass values f=
rom=20
                      one Xml file to another.<BR>Thanks in=20
                      Advance<BR>Lavanya</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV>&nbsp;</DIV>
                      <DIV><BR>--- On <B>Thu, 11/9/08, Soula, William=20
                      <I>&lt;wsoula@pointserve.com&gt;</I></B> wrote:<BR></=
DIV>
                      <BLOCKQUOTE=20
                      style=3D"BORDER-LEFT: rgb(16,16,255) 2px solid; PADDI=
NG-LEFT: 5px; MARGIN-LEFT: 5px">From:=20
                        Soula, William &lt;wsoula@pointserve.com&gt;<BR>Sub=
ject:=20
                        RE: [Webtest] passing parameters between two xml=20
                        files<BR>To: "webtest@lists.canoo.com"=20
                        &lt;webtest@lists.canoo.com&gt;<BR>Date: Thursday, =
11=20
                        September, 2008, 8:30 PM<BR><BR>
                        <DIV id=3Dyiv188977894>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial>I was thinking along the lines of=20
                        this:</FONT></SPAN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial>file 1:</FONT></SPAN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial>&lt;storeProperty property=3D"movie"=20
                        value=3D"23"/&gt;</FONT></SPAN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial>&lt;echo message=3D"movie=3D#{movie}"=
=20
                        file=3D"output.txt"/&gt;</FONT></SPAN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial></FONT></SPAN>&nbsp;</DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial>file2:</FONT></SPAN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial>&lt;property=20
                        file=3D"output.txt"/&gt;</FONT></SPAN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial>&lt;echo=20
                        message=3D"${movie}"/&gt;</FONT></SPAN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial></FONT></SPAN>&nbsp;</DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial>Something like that should be what you=
 want,=20
                        you could also use concat.&nbsp; If you want to use=
=20
                        groovy to output to the file you can do something l=
ike=20
                        below (I don't really know groovy, sorry=20
                        :)</FONT></SPAN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial>&lt;script=20
                        language=3D"groovy"&gt;</FONT></SPAN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008>&nbsp;&nbsp;&nbsp; <FONT=
=20
                        color=3D#0000ff size=3D2=20
                        face=3DArial>println("movie=3D#{movie}")</FONT></SP=
AN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial>&lt;/script&gt;</FONT></SPAN></DIV>
                        <DIV dir=3Dltr align=3Dleft><SPAN=20
                        class=3D998344714-11092008><FONT color=3D#0000ff si=
ze=3D2=20
                        face=3DArial></FONT></SPAN>&nbsp;</DIV><BR>
                        <DIV dir=3Dltr lang=3Den-us class=3DOutlookMessageH=
eader=20
                        align=3Dleft>
                        <HR tabIndex=3D-1>
                        <FONT size=3D2 face=3DTahoma><B>From:</B> lavanya=20
                        palaniswamy [mailto:lavan.swamy@yahoo.co.in]=20
                        <BR><B>Sent:</B> Thursday, September 11, 2008 7:14=
=20
                        AM<BR><B>To:</B> Soula, William<BR><B>Cc:</B>=20
                        webtest@lists.canoo.com<BR><B>Subject:</B> RE: [Web=
test]=20
                        passing parameters between two xml=20
                        files<BR></FONT><BR></DIV>
                        <DIV></DIV>
                        <TABLE border=3D0 cellSpacing=3D0 cellPadding=3D0>
                          <TBODY>
                          <TR>
                            <TD vAlign=3Dtop>Hi Soula,<BR>Thanks for=20
                              replying.<BR>I am not able to pass parameters=
=20
                              within two Xml files.<BR>So i tried convertin=
g=20
                              groovy variable to ant and then pass.<BR>But =
this=20
                              is not working.<BR>As per solution passing va=
lues=20
                              from main script to temp script again<BR>mean=
s=20
                              passing variables between two xml files.<BR>P=
lease=20
                              help me with the solution other than this=20
                              conversion from groovy to ant and<BR>passing =
the=20
                              values.<BR>Thanks in=20
                              advance<BR>Lavanya<BR><BR><BR><BR><BR><BR><BR=
><BR>---=20
                              On <B>Thu, 11/9/08, Soula, William=20
                              <I>&lt;wsoula@pointserve.com&gt;</I></B>=20
wrote:<BR>
                              <BLOCKQUOTE=20
                              style=3D"BORDER-LEFT: rgb(16,16,255) 2px soli=
d; PADDING-LEFT: 5px; MARGIN-LEFT: 5px">From:=20
                                Soula, William=20
                                &lt;wsoula@pointserve.com&gt;<BR>Subject: R=
E:=20
                                [Webtest] passing parameters between two xm=
l=20
                                files<BR>To: "webtest@lists.canoo.com"=20
                                &lt;webtest@lists.canoo.com&gt;<BR>Date:=20
                                Thursday, 11 September, 2008, 5:20 PM<BR><B=
R>
                                <DIV id=3Dyiv1328891058>
                                <DIV dir=3Dltr align=3Dleft><FONT color=3D#=
0000ff=20
                                size=3D2 face=3DArial><SPAN=20
                                class=3D889434911-11092008>Could you output=
 the=20
                                property to a temp property file and then r=
ead=20
                                it in with the other=20
                                script?</SPAN></FONT></DIV><BR>
                                <DIV dir=3Dltr lang=3Den-us=20
                                class=3DOutlookMessageHeader align=3Dleft>
                                <HR tabIndex=3D-1>
                                <FONT size=3D2 face=3DTahoma><B>From:</B>=20
                                webtest-admin@lists.canoo.com=20
                                [mailto:webtest-admin@lists.canoo.com] <B>O=
n=20
                                Behalf Of </B>lavanya=20
                                palaniswamy<BR><B>Sent:</B> Thursday, Septe=
mber=20
                                11, 2008 6:25 AM<BR><B>To:</B>=20
                                webtest@lists.canoo.com<BR><B>Subject:</B>=
=20
                                [Webtest] passing parameters between two xm=
l=20
                                files<BR></FONT><BR></DIV>
                                <DIV></DIV>
                                <TABLE border=3D0 cellSpacing=3D0 cellPaddi=
ng=3D0>
                                <TBODY>
                                <TR>
                                <TD vAlign=3Dtop>Hi All,<BR>Can any one hel=
p me in=20
                                passing parameters between two<BR>xml=20
                                files.<BR>With the following script(Script =
a1 is=20
                                xml file1 and Script b1 is xml file 2):<BR>=
<SPAN=20
                                style=3D"FONT-WEIGHT: bold">Script=20
                                a1:</SPAN><BR>&lt;target=20
                                name=3D"main1"&gt;<BR>&nbsp;&nbsp;&nbsp;=20
                                &lt;webtest name=3D"a1"&gt;<BR>&nbsp;=20
                                <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
                                &lt;steps&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
                                &nbsp;<BR>&lt;scriptStep description=3D"to =
check=20
                                alphabets"=20
                                language=3D"groovy"&gt;<BR>&nbsp;n1=3D"${n}=
";<BR><BR>&nbsp;=20
                                p =3D n1.length()<BR>&nbsp; <BR>&nbsp;=20
                                println("=3D=3D=3D=3D&gt;&gt;"+p);<BR>if(p&=
gt;8)<BR>&nbsp;{<BR>println("invalid=20
                                length")<BR>}<BR><BR>else<BR>{<BR>println("=
one=20
                                =3D=3D passed")<BR>&nbsp;&nbsp;&nbsp;=20
                                theRegularExpression =3D /([a-z])/<BR><BR>&=
nbsp;=20
                                if (n1=20
                                =3D~theRegularExpression)<BR>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;=20
                                &nbsp;<BR>&nbsp; {<BR>&nbsp;=20
                                step.setWebtestProperty('a', n1);<BR>&nbsp;=
=20
                                }<BR>&nbsp;else<BR>&nbsp;{<BR>println("one =
=3D=3D=20
                                Failed");<BR>}<BR><BR>}<BR>&lt;/scriptStep&=
gt;<BR><BR>
                                <HR style=3D"WIDTH: 100%; HEIGHT: 2px">
                                <BR><BR><SPAN style=3D"FONT-WEIGHT: bold">S=
cript=20
                                b1:</SPAN><BR>&lt;project name=3D"SimpleTes=
t"=20
                                basedir=3D"." &gt;<BR>&nbsp; &lt;property=20
                                name=3D"webtest.home" location=3D"C:/Progra=
m=20
                                Files/webtest" /&gt;<BR>&nbsp; &lt;import=20
                                file=3D"${webtest.home}/lib/taskdef.xml"/&g=
t;<BR>&nbsp;&nbsp;=20
                                &lt;ant antfile=3D"f1.xml" dir=3D"."=20
                                inheritrefs=3D"true" target=3D"main"&gt; <B=
R>&nbsp;=20
                                &lt;property=20
                                name=3D"webtest.connectioninitializer"=20
                                value=3D"com.canoo.webtest.security.SunJsse=
BaseConnectionInitializer"=20
                                /&gt;<BR>&nbsp; &lt;property=20
                                name=3D"webtest.truststore.file" value=3D"C=
:\Program=20
                                Files\Java\jdk1.6.0_03\jre\lib\security\cac=
erts"=20
                                /&gt; <BR>&nbsp; &lt;property=20
                                name=3D"webtest.truststore.passphrase"=20
                                value=3D"changeit" /&gt;<BR>&nbsp;=20
                                <BR>&nbsp;&nbsp; &nbsp;<BR>&nbsp;&nbsp;=20
                                &nbsp;&lt;property name=3D"n"=20
                                value=3D"wwwww"/&gt;<BR>&nbsp;&nbsp; &lt;!-=
-=20
                                &lt;property name=3D"a" value=3D"TEST2222"/=
&gt;=20
                                --&gt;<BR>&nbsp; &lt;/ant&gt; <BR>&nbsp;=20
                                &lt;target name=3D"main"&gt;<BR>&nbsp;&nbsp=
;&nbsp;=20
                                &lt;webtest name=3D"b1"&gt;<BR>&nbsp;&nbsp;=
&nbsp;=20
                                &lt;config<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;=20
                                host=3D"ddddd.net"<BR>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
                                protocol=3D"https"<BR>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
                                &gt;<BR>&nbsp;&nbsp;&nbsp; &lt;header=20
                                name=3D"User-Agent"=20
                                value=3D"Mozilla/4.0"/&gt;<BR>&nbsp;&nbsp;&=
nbsp;=20
                                &lt;header name=3D"Accept-Language"=20
                                value=3D"de-ch"/&gt;<BR>&nbsp;&nbsp;=20
                                &nbsp;<BR>&nbsp;&nbsp;&nbsp; &lt;option=20
                                name=3D"ThrowExceptionOnScriptError"=20
                                value=3D"false"/&gt;<BR>&nbsp; &lt;option=20
                                name=3D"JavaScriptEnabled"=20
                                value=3D"true"/&gt;<BR><BR>&nbsp; &lt;/conf=
ig&gt;=20
                                <BR>&nbsp;&nbsp;=20
                                &lt;steps&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;=20
                                &lt;storeProperty<BR>&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
                                description=3D"convert Ant to=20
                                dynamic"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
                                name=3D"a"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;=20
                                value=3D"${n}"/&gt;<BR>&lt;setInputField=20
                                name=3D"name.given" value=3D"#{a}"/&gt;<BR>=
&lt;echo=20
                                message=3D"#{a}"/&gt;<BR>&lt;/steps&gt;<BR>=
&nbsp;&nbsp;=20
                                &lt;/webtest&gt;<BR>&nbsp;=20
                                &lt;/target&gt;<BR>&lt;/project&gt;<BR>
                                <HR style=3D"WIDTH: 100%; HEIGHT: 2px">
                                <BR>Here am trying to call parameters from =
"a1"=20
                                in to "b1"<BR>script,by doing so,b1 is not=
=20
                                getting executed.<BR>Thanks in=20
                                Advance<BR>Lavanya<BR><BR></TD></TR></TBODY=
></TABLE><BR>
                                <HR SIZE=3D1>
                                Did you know? You can CHAT without download=
ing=20
                                messenger. <A target=3D_blank=20
                                href=3D"http://in.rd.yahoo.com/tagline_webm=
essenger_2/*http://in.webmessenger.yahoo.com/"=20
                                rel=3Dnofollow>Click=20
                          here</A></DIV></BLOCKQUOTE></TD></TR></TBODY></TA=
BLE><BR>
                        <HR SIZE=3D1>
                        Unlimited freedom, unlimited storage. <A target=3D_=
blank=20
                        href=3D"http://in.rd.yahoo.com/tagline_mail_2/*http=
://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/"=20
                        rel=3Dnofollow>Get it now</A>=20
                  </DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE><BR>
                <HR SIZE=3D1>
                Connect with friends all over the world. <A target=3D_blank=
=20
                href=3D"http://in.rd.yahoo.com/tagline_messenger_1/*http://=
in.messenger.yahoo.com/?wm=3Dn/"=20
                rel=3Dnofollow>Get Yahoo! India=20
          Messenger.</A></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE><BR>
        <HR SIZE=3D1>
        Unlimited freedom, unlimited storage. <A target=3D_blank=20
        href=3D"http://in.rd.yahoo.com/tagline_mail_2/*http://help.yahoo.co=
m/l/in/yahoo/mail/yahoomail/tools/tools-08.html/"=20
        rel=3Dnofollow>Get it now</A></DIV></BLOCKQUOTE></TD></TR></TBODY><=
/TABLE><BR><!--2-->
<HR SIZE=3D1>
</HR>Unlimited freedom, unlimited storage. <A=20
href=3D"http://in.rd.yahoo.com/tagline_mail_2/*http://help.yahoo.com/l/in/y=
ahoo/mail/yahoomail/tools/tools-08.html/">Get=20
it now</A></BODY></HTML>

--_000_93B3B6122B906D44BC7E8B8CEFB0DBBB184529EBA7SGPEXCHANGEpo_--