Package com.microsoft.playwright
Class Page.RouteFromHAROptions
- java.lang.Object
-
- com.microsoft.playwright.Page.RouteFromHAROptions
-
-
Field Summary
Fields Modifier and Type Field Description 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.Boolean
update
If specified, updates the given HAR with the actual network information instead of serving from file.Object
url
A glob pattern, regular expression or predicate to match the request URL.
-
Constructor Summary
Constructors Constructor Description RouteFromHAROptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.Page.RouteFromHAROptions
setUpdate(boolean update)
If specified, updates the given HAR with the actual network information instead of serving from file.Page.RouteFromHAROptions
setUrl(String url)
A glob pattern, regular expression or predicate to match the request URL.Page.RouteFromHAROptions
setUrl(Pattern url)
A glob pattern, regular expression or predicate to match the request URL.
-
-
-
Field Detail
-
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 whenBrowserContext.close()
is called.
-
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.
-
-
Method Detail
-
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 whenBrowserContext.close()
is called.
-
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.
-
-