Class NetworkConditions

java.lang.Object
org.openqa.selenium.devtools.v142.network.model.NetworkConditions

@Beta public class NetworkConditions extends Object
  • Constructor Details

  • Method Details

    • getUrlPattern

      public String getUrlPattern()
      Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/). If the pattern is empty, all requests are matched (including p2p connections).
    • getLatency

      public Number getLatency()
      Minimum latency from request sent to response headers received (ms).
    • getDownloadThroughput

      public Number getDownloadThroughput()
      Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
    • getUploadThroughput

      public Number getUploadThroughput()
      Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
    • getConnectionType

      public Optional<ConnectionType> getConnectionType()
      Connection type if known.
    • getPacketLoss

      public Optional<Number> getPacketLoss()
      WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
    • getPacketQueueLength

      public Optional<Integer> getPacketQueueLength()
      WebRTC packet queue length (packet). 0 removes any queue length limitations.
    • getPacketReordering

      public Optional<Boolean> getPacketReordering()
      WebRTC packetReordering feature.