Class ChromiumNetworkConditions

java.lang.Object
org.openqa.selenium.chromium.ChromiumNetworkConditions

public class ChromiumNetworkConditions extends Object
Provides manipulation of getting and setting network conditions from Chromium.
  • Field Details

  • Constructor Details

    • ChromiumNetworkConditions

      public ChromiumNetworkConditions()
  • Method Details

    • getOffline

      public boolean getOffline()
      Returns:
      whether network is simulated to be offline.
    • setOffline

      public void setOffline(boolean offline)
      Whether the network is set to offline. Defaults to false.
      Parameters:
      offline - when set to true, network is simulated to be offline.
    • getLatency

      public Duration getLatency()
      The current simulated latency of the connection.
      Returns:
      amount of latency, typically a Duration of milliseconds.
    • setLatency

      public void setLatency(Duration latency)
      Sets the simulated latency of the connection.
      Parameters:
      latency - amount of latency, typically a Duration of milliseconds.
    • getDownloadThroughput

      public int getDownloadThroughput()
      The current throughput of the network connection in kb/second for downloading.
      Returns:
      the current download throughput in kb/second.
    • setDownloadThroughput

      public void setDownloadThroughput(int downloadThroughput)
      Sets the throughput of the network connection in kb/second for downloading.
      Parameters:
      downloadThroughput - throughput in kb/second
    • getUploadThroughput

      public int getUploadThroughput()
      The current throughput of the network connection in kb/second for uploading.
      Returns:
      the current upload throughput in kb/second.
    • setUploadThroughput

      public void setUploadThroughput(int uploadThroughput)
      Sets the throughput of the network connection in kb/second for uploading.
      Parameters:
      uploadThroughput - throughput in kb/second