Nick, Thanks for your question. The reason to use safe navigation is to make code clear. You can see from Java, there are a lot of places for exception handing. Groovy reduces a lot of them.
The navigation error happens only when you have typos in the UID "a.b.c". But you do have good point for throwing exceptions. We will take this into consideration and add exception handling there. Thanks, Jian On Jan 24, 7:22 pm, Nicolae Vintila <[email protected]> wrote: > Hello, > > Found that my code works when it should not - > > mouseOver "a.b.c" > > does not give any sign if a, b or c do not exist. > This is made possible by "safe navigation" - see below > . > def click(String uid){ > WorkflowContext context = WorkflowContext.getDefaultContext() > ui.walkTo(context, uid)?.click(){ loc, String[] events -> > String locator = locatorMapping(context, loc) > eventHandler.click(locator, events) > } > } > > Since it is used consistently in Widget it must be intentional but I can't > see how this behavior is beneficial. > An exception would be more desired, I'd say... > > Please shed some light. > > Thanks in advance, > Nick --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
