Thanks for your answer.
However I already call storeRegEx within a webtest function. I suppose
that it's the same thing as define a new ant etc.

But the problem is when I try to get the value :

for example
        webtest(name:"webtest") {

                invoke url: ...
                storeRegEx text:"id=\"editParty:(.+?)\"", group:"1",
property:"prop"
                println("#{prop}") // display:  #{prop} on the screen
                /* further steps */
            }


Stefan Frenzel a écrit :
> Well, I think you cannot simply call storeRegEx without an AntBuilder.
>
> Try this:
> def ant = new AntBuilder()
> ant.webtest(name:"webtest") {
> steps() {
>  storeRegEx(text:"...",group:"...",property:"prop")
>  /* further steps */
> }
> }
>
> Then you should be able to use #{prop} within further steps since
> dynamic properties are the default.
>
> Take a look at the repeat step in conjunction with its xpath attribute
> instead of regex for the second issue.
>
>
>> Hi,
>>
>> I'm a new user of canoo...
>>
>> I would like to automatize the filling of fields. To do that I would
>> like to use storeRegEx to retrieve the fields id...
>>
>> However I don't know how to get the return string of this function with
>> groovy. The examples are only for xml.
>>
>> I try these following things :
>>
>> storeRegEx text:"id=\"editParty:(.+?)\"", group:"1", property:"value"
>> println(value)
>> println("${value})
>> println("#{value})
>>
>> or
>> String value
>> storeRegEx text:"id=\"editParty:(.+?)\"", group:"1", property:value
>> println(value)
>>
>> and nothing seems work...
>>
>> How can I realize that?
>>
>> My second problem is that I would like to get all fields and not only
>> the first one.
>> Does anyone  know how to do that (with Java I get an array of matching
>> string)?
>>
>> thanks a lot in advance.
>>
>> Lucien
>> _______________________________________________
>> WebTest mailing list
>> [email protected]
>> http://lists.canoo.com/mailman/listinfo/webtest
>>   
>
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
>

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to