1
0
-1

Hi,

The various modules in the Maestro API don't appear to be available to custom scripts.

Is there a way to call Maestro API functions from within a custom script?

Cheers,

Dan

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi Daniel,

      You should probably be doing that inside the JavaScript code of a custom native component.

      1. Daniel Carlier

        Hi Bill,

        Sometimes it's useful to be able to encapsulate certain re-usable functions that may not necessarily be tied to a single component inside of a custom script. For instance it would be great to be able to use the Util functions from within a custom script as they're fairly versatile. But they - as well as other API functions don't appear to be accessible.

        Cheers,

        Dan

      2. Bill Frost

        Hi Dan,

        'Form' and 'Util' do seem to be available on the 'maestro' object, but only after the app has finished initializing.

        You could also have the caller pass the Util object into the methods of the library.

      3. Daniel Carlier

        Hi Bill,

        Thanks for the response. I was able to call the Util method using maestro.Util.functionName(..) instead of just Util.functionName(..)

        Also good to know about when they become available.

        Cheers,

        Dan

      CommentAdd your comment...