If I remember correctly (on my mobile atm) Navigator.click() returns the
clicked navigator instance, so your assumption is not correct.

I would suggest writing a custom module implementation with a method
called, for example, clickTo() having HelpPage as the return type and the
implementation could call click() and return the value returned from "at
HelpPage". Finally I would use that module for your content definition,
remove the to template option from your content definition and call
clickTo() instead of click() in yoir code.

You could make your model parameterised (there is a section in the manual
about parameterised modules) with the target page being the parameter if
you wanted to apply this pattern in multiple places that deal with
different target pages.

On Wed, 16 Aug 2017 at 11:05, Samuel Rossinovic <[email protected]>
wrote:

> Hi.
>
> Taking the example from geb's doc:
>
> class PageWithTemplateUsingToOption extends Page
> {
>     static content = {
>         helpLink(to: HelpPage) { $("a", text: "Help") }
>     }
> }
>
> to PageWithTemplateUsingToOption
> helpLink.click()
>
>
>
> Can I expect the return value from the click to be the page pointed-to by
> the to: paramater?
>
> HelpPage helpPage = helpLink.click()
>
>
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Geb User Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/geb-user/cff33ec1-2ad2-4104-89b6-97bd728f60ac%40googlegroups.com
> <https://groups.google.com/d/msgid/geb-user/cff33ec1-2ad2-4104-89b6-97bd728f60ac%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/CA%2B52dQT1R2fVrbMerqPx6j%3DNQDADN64FMpjnso5i_KzQnDSwtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to