[Webtest] how to access properties from groovy

Kazuchika Sekiya Kazuchika Sekiya" <kazuchika@gmail.com
Wed, 10 Sep 2008 17:04:29 +0900


Dierk,

Thanks for your help.
But does this notation work even in Groovy code?

I tried:
--
  storeXPath xpath:'//div[2]', property:'result'
  def result =3D "#{result}"
  println result.class
  println result
--
but the output was:
--
class java.lang.String
#{result}
--

Am I misunderstanding anything?
(again I am using pure groovy testcase, this is not in XML code)

Thanks,
kazuchika


On Wed, Sep 10, 2008 at 4:43 PM, Dierk K=F6nig <dierk.koenig@canoo.com> wro=
te:
> with the #{propname} notation, see
> http://webtest.canoo.com/webtest/manual/properties.html
>
> happy testing
> Dierk
>
> P.S. great to see you on this list ;-)
>
> | -----Original Message-----
> | From: webtest-admin@lists.canoo.com
> | [mailto:webtest-admin@lists.canoo.com] On Behalf Of Kazuchika Sekiya
> | Sent: Mittwoch, 10. September 2008 9:27
> | To: webtest@lists.canoo.com
> | Subject: [Webtest] how to access properties from groovy
> |
> | Hi,
> |
> | I'm trying to write some tests completely in Groovy using
> | WebtestCase. Most functions work fine but I have one question.
> |
> | How can I access to dynamic properties from Groovy?
> |
> | In my test class (which extends WebtestCase), I did:
> | --
> |   storeXPath xpath:'//div[2]', property:'result'
> | --
> | I want to use this "result" property value in my Groovy code.
> |
> | Thanks a lot,
> | kazuchika
> | _______________________________________________
> | WebTest mailing list
> | WebTest@lists.canoo.com
> | http://lists.canoo.com/mailman/listinfo/webtest
> |
>