Class Page.RouteFromHAROptions

java.lang.Object
com.microsoft.playwright.Page.RouteFromHAROptions
Enclosing interface:
Page

public static class Page.RouteFromHAROptions extends Object
  • Field Details

    • notFound

      public HarNotFound notFound
      • If set to 'abort' any request not found in the HAR file will be aborted.
      • If set to 'fallback' missing requests will be sent to the network.

      Defaults to abort.

    • update

      public Boolean update
      If specified, updates the given HAR with the actual network information instead of serving from file. The file is written to disk when BrowserContext.close() is called.
    • updateContent

      public RouteFromHarUpdateContentPolicy updateContent
      Optional setting to control resource content management. If attach is specified, resources are persisted as separate files or entries in the ZIP archive. If embed is specified, content is stored inline the HAR file.
    • updateMode

      public HarMode updateMode
      When set to minimal, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to full.
    • url

      public Object url
      A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the pattern will be served from the HAR file. If not specified, all requests are served from the HAR file.
  • Constructor Details

    • RouteFromHAROptions

      public RouteFromHAROptions()
  • Method Details

    • setNotFound

      public Page.RouteFromHAROptions setNotFound(HarNotFound notFound)
      • If set to 'abort' any request not found in the HAR file will be aborted.
      • If set to 'fallback' missing requests will be sent to the network.

      Defaults to abort.

    • setUpdate

      public Page.RouteFromHAROptions setUpdate(boolean update)
      If specified, updates the given HAR with the actual network information instead of serving from file. The file is written to disk when BrowserContext.close() is called.
    • setUpdateContent

      public Page.RouteFromHAROptions setUpdateContent(RouteFromHarUpdateContentPolicy updateContent)
      Optional setting to control resource content management. If attach is specified, resources are persisted as separate files or entries in the ZIP archive. If embed is specified, content is stored inline the HAR file.
    • setUpdateMode

      public Page.RouteFromHAROptions setUpdateMode(HarMode updateMode)
      When set to minimal, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to full.
    • setUrl

      public Page.RouteFromHAROptions setUrl(String url)
      A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the pattern will be served from the HAR file. If not specified, all requests are served from the HAR file.
    • setUrl

      public Page.RouteFromHAROptions setUrl(Pattern url)
      A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the pattern will be served from the HAR file. If not specified, all requests are served from the HAR file.