Thanks a lot Denis and Paul.

I got it to work by using,

doc_ele=
step.getContext().getCurrentResponse().getDocumentElement()

doc_ele.getHtmlElementsByAttribute('a', 'id',
'form1:table1:_tableActionsBottom:_paginationNextButton').each{
step.setWebtestProperty("nextPage","true")
}

inside <scriptStep>

I will centainly try what you two suggested. It looks
a lot simpler.

thanks!!

Chang



--- "Denis N. Antonioli" <[EMAIL PROTECTED]>
wrote:

> Hi
> 
> On 1 mars 07, at 01:09, Chang Su wrote:
> 
> > The xml is as follows,
> >
> > ...
> > <storeXPath
> > description="Extract href of next button"
> > xpath="//a 
> >
>
[EMAIL PROTECTED]'form1:table1:_tableActionsBottom:_paginationNextButton']"
> > property="uri" />
> >
> > <ifStep test="#{uri}" >
> > <clickElement
> > xpath="//a 
> >
>
[EMAIL PROTECTED]'form1:table1:_tableActionsBottom:_paginationNextButton']"
> > />
> > <verifytitle
> >       text="All Domains"/>
> > .....
> > </ifStep>
> >
> >
> > If I use test="#{uri}", I got exception as below,
> and
> > if I use "${uri}" the test fails even though the
> > button exists in the page.
> >
> > Seems test parameter in <ifStep> only recognize
> "true"
> > or "false" but nothing else. How do I translate
> the
> > property of xpath into a boolean "true" or
> "false"?
> 
> about something like:
> 
> <ifStep>
>       <condition>
>               <verifyXPath xpath="boolean(//a 
>
[EMAIL PROTECTED]'form1:table1:_tableActionsBottom:_paginationNextButton'])"
> />
>       </condition>
> 
>       <clickElement xpath="//a 
>
[EMAIL PROTECTED]'form1:table1:_tableActionsBottom:_paginationNextButton']"
> />
> ...
> </ifStep>
> 
> 
> Best
>       dna
> 
> -- 
> No one can write decently who is distrustful of the
> reader's  
> intelligence, or whose attitude is patronizing.
>    - William Strunk & E. B. White, The elements of
> style
> 
> 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 



 
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to