public void setFtpProxy(String proxyHost) {
    if (!StringUtils.equalsIgnoreCase(proxyHost, "none")) {
      proxy = new Proxy();
      proxy.setFtpProxy(proxyHost);

      capabilities.setCapability(CapabilityType.PROXY, proxy);
    }
  }
Example #2
0
  public static DesiredCapabilities getCapabilities() {
    // ---------- PROXY Capabilities --------------
    org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
    proxy.setSslProxy(proxyUrl + ":" + proxyPort);
    proxy.setFtpProxy(proxyUrl + ":" + proxyPort);
    proxy.setSocksUsername("");
    proxy.setSocksPassword("");

    DesiredCapabilities dc = DesiredCapabilities.firefox();
    dc.setCapability(CapabilityType.PROXY, proxy);
    return dc;
  }