I agree completely . The UI Module has a lot of logic . But there are some
links which are kind of stand alone and which need to handled this way

Regards
Hari

On Mon, Mar 30, 2009 at 8:50 AM, John <[email protected]> wrote:

>
> Usually, you should have more than one action/data access in one
> method.
> But if you really only need one action/data access to call from your
> test code,
> you can use the methods defined in DslContext directly.
>
> For example, in your case, you can simply use
>
> myModule.click("xxx")
>
> which uses the the following method in DslContext
>
> click(String uid)
>
> For other methods, you can use the same way.
>
> But if possible, I would still suggest you have more
> complicated method defined in your UI module to represent
> a business logic instead of call individual DslContext methods
> directly.
>
> Thanks,
>
> Jian
>
> On Mar 29, 10:53 pm, Harihara Vinayakaram <[email protected]> wrote:
> > Hi
> >    I find that some of my code is looking like the following
> >
> > public myModule extends DslContext {
> > defineUi() {
> >
> >     ui.UrlLink(uid:"xxx", clocator[id:"xxx"]);
> >
> > }
> >
> > public boolean clickXXX() {
> >     xxx.click();
> >     return true;
> >
> > }
> > }
> >
> > and I invoke this as myModule.clickXXX .
> >
> > I want to avoid having to write a method clickXXX .
> >
> > Initially I was using methodMissing which did not work with groovy 1.5.7
> .
> > John assured me that it works with 1.6.0 .
> >
> > Is there any better way to write / handle such code ?
> >
> > Regards
> > Hari
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to