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 <[EMAIL PROTECTED]> wrote:
From: Soula, William <[EMAIL PROTECTED]>
Subject: RE: [Webtest] passing parameters between two xml files
To: "[email protected]" <[email protected]>
Date: Thursday, 11 September, 2008, 5:20 PM



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



From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of lavanya 
palaniswamy
Sent: Thursday, September 11, 2008 6:25 AM
To: 
[email protected]
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="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




Did you know? You can CHAT without downloading messenger. Click 
here


      Unlimited freedom, unlimited storage. Get it now, on 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

Reply via email to