Class Network<AUTHREQUIRED,REQUESTPAUSED>
- java.lang.Object
-
- org.openqa.selenium.devtools.idealized.Network<AUTHREQUIRED,REQUESTPAUSED>
-
public abstract class Network<AUTHREQUIRED,REQUESTPAUSED> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNetwork.UserAgent
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddAuthHandler(java.util.function.Predicate<java.net.URI> whenThisMatches, java.util.function.Supplier<org.openqa.selenium.Credentials> useTheseCredentials)protected abstract Event<AUTHREQUIRED>authRequiredEvent()protected abstract Command<java.lang.Void>cancelAuth(AUTHREQUIRED authrequired)protected abstract Command<java.lang.Void>continueRequest(REQUESTPAUSED pausedReq, org.openqa.selenium.remote.http.HttpRequest req)protected abstract Command<java.lang.Void>continueWithAuth(AUTHREQUIRED authRequired, org.openqa.selenium.UsernameAndPassword credentials)protected abstract Command<java.lang.Void>continueWithoutModification(REQUESTPAUSED pausedReq)protected org.openqa.selenium.remote.http.HttpMethodconvertFromCdpHttpMethod(java.lang.String method)protected org.openqa.selenium.remote.http.HttpRequestcreateHttpRequest(java.lang.String cdpMethod, java.lang.String url, java.util.Map<java.lang.String,java.lang.Object> headers, java.util.Optional<java.lang.String> postData)protected org.openqa.selenium.remote.http.HttpResponsecreateHttpResponse(java.util.Optional<java.lang.Integer> statusCode, java.lang.String body, java.lang.Boolean bodyIsBase64Encoded, java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> headers)protected abstract org.openqa.selenium.internal.Either<org.openqa.selenium.remote.http.HttpRequest,org.openqa.selenium.remote.http.HttpResponse>createSeMessages(REQUESTPAUSED pausedReq)voiddisable()protected abstract Command<java.lang.Void>disableFetch()protected abstract Command<java.lang.Void>disableNetworkCaching()protected abstract Command<java.lang.Void>enableFetchForAllPatterns()protected abstract Command<java.lang.Void>enableNetworkCaching()protected abstract Command<java.lang.Void>fulfillRequest(REQUESTPAUSED pausedReq, org.openqa.selenium.remote.http.HttpResponse res)protected java.util.Optional<org.openqa.selenium.Credentials>getAuthCredentials(java.net.URI uri)protected abstract java.lang.StringgetRequestId(REQUESTPAUSED pausedReq)protected abstract java.lang.StringgetUriFrom(AUTHREQUIRED authRequired)voidinterceptTrafficWith(org.openqa.selenium.remote.http.Filter filter)voidmarkNetworkInterceptorClosed()voidprepareToInterceptTraffic()protected abstract Event<REQUESTPAUSED>requestPausedEvent()voidresetNetworkFilter()voidsetUserAgent(java.lang.String userAgent)voidsetUserAgent(Network.UserAgent userAgent)protected abstract Command<java.lang.Void>setUserAgentOverride(Network.UserAgent userAgent)
-
-
-
Field Detail
-
devTools
protected final DevTools devTools
-
-
Constructor Detail
-
Network
public Network(DevTools devtools)
-
-
Method Detail
-
disable
public void disable()
-
setUserAgent
public void setUserAgent(java.lang.String userAgent)
-
setUserAgent
public void setUserAgent(Network.UserAgent userAgent)
-
addAuthHandler
public void addAuthHandler(java.util.function.Predicate<java.net.URI> whenThisMatches, java.util.function.Supplier<org.openqa.selenium.Credentials> useTheseCredentials)
-
resetNetworkFilter
public void resetNetworkFilter()
-
markNetworkInterceptorClosed
public void markNetworkInterceptorClosed()
-
interceptTrafficWith
public void interceptTrafficWith(org.openqa.selenium.remote.http.Filter filter)
-
prepareToInterceptTraffic
public void prepareToInterceptTraffic()
-
getAuthCredentials
protected java.util.Optional<org.openqa.selenium.Credentials> getAuthCredentials(java.net.URI uri)
-
convertFromCdpHttpMethod
protected org.openqa.selenium.remote.http.HttpMethod convertFromCdpHttpMethod(java.lang.String method)
-
createHttpResponse
protected org.openqa.selenium.remote.http.HttpResponse createHttpResponse(java.util.Optional<java.lang.Integer> statusCode, java.lang.String body, java.lang.Boolean bodyIsBase64Encoded, java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> headers)
-
createHttpRequest
protected org.openqa.selenium.remote.http.HttpRequest createHttpRequest(java.lang.String cdpMethod, java.lang.String url, java.util.Map<java.lang.String,java.lang.Object> headers, java.util.Optional<java.lang.String> postData)
-
setUserAgentOverride
protected abstract Command<java.lang.Void> setUserAgentOverride(Network.UserAgent userAgent)
-
enableNetworkCaching
protected abstract Command<java.lang.Void> enableNetworkCaching()
-
disableNetworkCaching
protected abstract Command<java.lang.Void> disableNetworkCaching()
-
enableFetchForAllPatterns
protected abstract Command<java.lang.Void> enableFetchForAllPatterns()
-
disableFetch
protected abstract Command<java.lang.Void> disableFetch()
-
authRequiredEvent
protected abstract Event<AUTHREQUIRED> authRequiredEvent()
-
getUriFrom
protected abstract java.lang.String getUriFrom(AUTHREQUIRED authRequired)
-
continueWithAuth
protected abstract Command<java.lang.Void> continueWithAuth(AUTHREQUIRED authRequired, org.openqa.selenium.UsernameAndPassword credentials)
-
cancelAuth
protected abstract Command<java.lang.Void> cancelAuth(AUTHREQUIRED authrequired)
-
requestPausedEvent
protected abstract Event<REQUESTPAUSED> requestPausedEvent()
-
getRequestId
protected abstract java.lang.String getRequestId(REQUESTPAUSED pausedReq)
-
createSeMessages
protected abstract org.openqa.selenium.internal.Either<org.openqa.selenium.remote.http.HttpRequest,org.openqa.selenium.remote.http.HttpResponse> createSeMessages(REQUESTPAUSED pausedReq)
-
continueWithoutModification
protected abstract Command<java.lang.Void> continueWithoutModification(REQUESTPAUSED pausedReq)
-
continueRequest
protected abstract Command<java.lang.Void> continueRequest(REQUESTPAUSED pausedReq, org.openqa.selenium.remote.http.HttpRequest req)
-
fulfillRequest
protected abstract Command<java.lang.Void> fulfillRequest(REQUESTPAUSED pausedReq, org.openqa.selenium.remote.http.HttpResponse res)
-
-