PhantomJsCloud Automation API
    Preparing search index...

    Class Meta

    contains helpers for operating outside of the current page. such as get/set values between page navigations, and logging details that will be stored in your response output.*

    Hierarchy

    • _PlatformObjBinding
      • Meta
    Index
    store: MetaStore = ...

    A dictionary that is available across your entire request, including across page naviagions.

    When your request finishes, the key/values of this dictionary will be in the outputJson (userResponse.content.automation.storage)

    See the MetaStore documentation for more details.

    //store a value that can be read by other pages, and is also available in the response output
    page.meta.store.set("answer",42);
    • log a value (and time this method is called) that will be found under pageResponse.automationResult.logs and pageResponses.events if you choose the request setting outputAsJson:true (in IPageRequest)

      Parameters

      • value: any

      Returns Promise<number>

      // when page domLoaded event is fired, write a log message.
      page.on("domcontentloaded",()=>{ page.meta.log("page is viewable"); });
    • log an error. This will cause the API to return HTTP Status 424 if pageRequest.requestSettings.stopOnError=true

      these errors are available in the JSON response output (outputAsJson) under pageResponses[].automationResult.errors and pageResponses[].errors

      Parameters

      • message: string
      • Optionaldetails: any

      Returns Promise<void>

    • obtain the IPageRequest you submitted and used by this API call

      Returns Promise<any>