Class Network<AUTHREQUIRED,​REQUESTPAUSED>


  • public abstract class Network<AUTHREQUIRED,​REQUESTPAUSED>
    extends java.lang.Object
    • 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)
      • 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)
      • 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()
      • 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)
      • 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)