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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addAuthHandler(java.util.function.Predicate<java.net.URI> whenThisMatches, java.util.function.Supplier<org.openqa.selenium.Credentials> useTheseCredentials)
OpaqueKey
addRequestHandler(java.util.function.Predicate<org.openqa.selenium.remote.http.HttpRequest> whenThisMatches, java.util.function.Function<org.openqa.selenium.remote.http.HttpRequest,org.openqa.selenium.remote.http.HttpResponse> returnThis)
OpaqueKey
addRequestHandler(org.openqa.selenium.remote.http.Routable routable)
protected abstract Event<AUTHREQUIRED>
authRequiredEvent()
protected abstract Command<java.lang.Void>
cancelAuth(AUTHREQUIRED authrequired)
protected abstract Command<java.lang.Void>
continueWithAuth(AUTHREQUIRED authRequired, org.openqa.selenium.UsernameAndPassword credentials)
protected abstract Command<java.lang.Void>
continueWithoutModification(REQUESTPAUSED pausedRequest)
protected org.openqa.selenium.remote.http.HttpMethod
convertFromCdpHttpMethod(java.lang.String method)
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)
protected abstract java.util.Optional<org.openqa.selenium.remote.http.HttpRequest>
createHttpRequest(REQUESTPAUSED pausedRequest)
protected abstract Command<java.lang.Void>
createResponse(REQUESTPAUSED pausedRequest, org.openqa.selenium.remote.http.HttpResponse response)
void
disable()
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 java.util.Optional<org.openqa.selenium.Credentials>
getAuthCredentials(java.net.URI uri)
protected java.util.Optional<org.openqa.selenium.remote.http.HttpResponse>
getHttpResponse(org.openqa.selenium.remote.http.HttpRequest forRequest)
protected abstract java.lang.String
getUriFrom(AUTHREQUIRED authRequired)
void
removeRequestHandler(OpaqueKey key)
protected abstract Event<REQUESTPAUSED>
requestPausedEvent()
-
-
-
Field Detail
-
devTools
protected final DevTools devTools
-
-
Constructor Detail
-
Network
public Network(DevTools devtools)
-
-
Method Detail
-
disable
public void disable()
-
addAuthHandler
public void addAuthHandler(java.util.function.Predicate<java.net.URI> whenThisMatches, java.util.function.Supplier<org.openqa.selenium.Credentials> useTheseCredentials)
-
addRequestHandler
public OpaqueKey addRequestHandler(org.openqa.selenium.remote.http.Routable routable)
-
addRequestHandler
public OpaqueKey addRequestHandler(java.util.function.Predicate<org.openqa.selenium.remote.http.HttpRequest> whenThisMatches, java.util.function.Function<org.openqa.selenium.remote.http.HttpRequest,org.openqa.selenium.remote.http.HttpResponse> returnThis)
-
removeRequestHandler
public void removeRequestHandler(OpaqueKey key)
-
getAuthCredentials
protected java.util.Optional<org.openqa.selenium.Credentials> getAuthCredentials(java.net.URI uri)
-
getHttpResponse
protected java.util.Optional<org.openqa.selenium.remote.http.HttpResponse> getHttpResponse(org.openqa.selenium.remote.http.HttpRequest forRequest)
-
convertFromCdpHttpMethod
protected org.openqa.selenium.remote.http.HttpMethod convertFromCdpHttpMethod(java.lang.String method)
-
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)
-
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()
-
createHttpRequest
protected abstract java.util.Optional<org.openqa.selenium.remote.http.HttpRequest> createHttpRequest(REQUESTPAUSED pausedRequest)
-
continueWithoutModification
protected abstract Command<java.lang.Void> continueWithoutModification(REQUESTPAUSED pausedRequest)
-
createResponse
protected abstract Command<java.lang.Void> createResponse(REQUESTPAUSED pausedRequest, org.openqa.selenium.remote.http.HttpResponse response)
-
-