Package com.microsoft.playwright
Class BrowserContext.RouteFromHAROptions
java.lang.Object
com.microsoft.playwright.BrowserContext.RouteFromHAROptions
- Enclosing interface:
BrowserContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionIf set to 'abort' any request not found in the HAR file will be aborted. If set to 'fallback' falls through to the next route handler in the handler chain.If specified, updates the given HAR with the actual network information instead of serving from file.Optional setting to control resource content management.When set tominimal, only record information necessary for routing from HAR.A glob pattern, regular expression or predicate to match the request URL. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetNotFound(HarNotFound notFound) If set to 'abort' any request not found in the HAR file will be aborted. If set to 'fallback' falls through to the next route handler in the handler chain.setUpdate(boolean update) If specified, updates the given HAR with the actual network information instead of serving from file.setUpdateContent(RouteFromHarUpdateContentPolicy updateContent) Optional setting to control resource content management.setUpdateMode(HarMode updateMode) When set tominimal, only record information necessary for routing from HAR.A glob pattern, regular expression or predicate to match the request URL.A glob pattern, regular expression or predicate to match the request URL.
-
Field Details
-
notFound
- If set to 'abort' any request not found in the HAR file will be aborted.
- If set to 'fallback' falls through to the next route handler in the handler chain.
Defaults to abort.
-
update
If specified, updates the given HAR with the actual network information instead of serving from file. The file is written to disk whenBrowserContext.close()is called. -
updateContent
Optional setting to control resource content management. Ifattachis specified, resources are persisted as separate files or entries in the ZIP archive. Ifembedis specified, content is stored inline the HAR file. -
updateMode
When set tominimal, 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 tominimal. -
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
- If set to 'abort' any request not found in the HAR file will be aborted.
- If set to 'fallback' falls through to the next route handler in the handler chain.
Defaults to abort.
-
setUpdate
If specified, updates the given HAR with the actual network information instead of serving from file. The file is written to disk whenBrowserContext.close()is called. -
setUpdateContent
public BrowserContext.RouteFromHAROptions setUpdateContent(RouteFromHarUpdateContentPolicy updateContent) Optional setting to control resource content management. Ifattachis specified, resources are persisted as separate files or entries in the ZIP archive. Ifembedis specified, content is stored inline the HAR file. -
setUpdateMode
When set tominimal, 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 tominimal. -
setUrl
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
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.
-