Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Properties

Methods

Properties

store

store: MetaStore = new MetaStore( this._internalState )

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.

example
//store a value that can be read by other pages, and is also available in the response output
page.meta.store.set("answer",42);

Methods

log

  • log(value: any): Promise<number>
  • log a value (and time this method is called) that will be found under content.automation.log if you choose the request setting outputAsJson:true (in [[IPageRequest]])

    example
    // when page domLoaded event is fired, write a log message.
    page.on("domcontentloaded",()=>{  page.meta.log("page is viewable");   });

    Parameters

    • value: any

    Returns Promise<number>

logError

  • logError(message: string, details?: any): Promise<void>
  • log an error. This will cause the API to return HTTP Status 424 if pageRequest.stopOnErrors=true

    these errors are available in the JSON response output under userResponse.content.automation.errors

    Parameters

    • message: string
    • Optional details: any

    Returns Promise<void>

request

  • request(): Promise<any>
  • obtain the [[IPageRequest]] you submitted and used by this API call

    Returns Promise<any>