I am assuming you want to pass the x variable back to webtest to use.  In your 
scriptStep use step.setWebtestProperty('x', x); this will create a webtest 
property of x.  Then you can use it in webtest as #{x}.

William Soula
QA Analyst

Pointserve, Inc.
110 Wild Basin Road
Suite 300
Austin, Texas 78746
O: 512.617.5311
F: 512.617.0466


________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of lavanya 
palaniswamy
Sent: Tuesday, March 11, 2008 6:53 AM
To: [email protected]
Subject: [Webtest] groovy with canoo

Hi,
I have to implement groovy with canoo to validate
textfield value for special characters.
with groovy i have written validation script,i
dunno how to pass that value to canoo.
for eg x="hello"
Here after validating x,how can
I pass the value of x to setinputfield of canoo.
Please find the script below:

<steps>
<scriptStep description="to check  for alphabets" language="groovy">
x="lavanya"
  println(x)
  theRegularExpression = /([a-zA-Z])/

  if (x =~theRegularExpression)

  {
   println("passed")
  }
 else
 {
 println("failed")
 }

</scriptStep>
</steps>
>From the above scripting ,how can i pass the  value  to setinput attribute.
That is to
"<setInputField name="applicant.name.first" value="${x}"/>"
Thanks in Advance
Lavanya




________________________________
________________________________
Get the freedom to save as many mails as you wish. Click here to know 
how.<http://in.rd.yahoo.com/tagline_mail_5/*http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/>

Reply via email to