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)
      • 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()
      • 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)
      • 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)