Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It is not sufficient to define it as for the RemoteWebDriver as described here: Using Java RemoteWebDriver with proxy

Step-by-step guide

In the ReportiumExportUtils :

...

  1. Add following lines:

    Code Block
    languagejava
    	//replace with the actual proxy host and port
    	private static final String PROXY_H = "<proxy_host>";
    	private static final String PROXY_P = "<proxy_port>";
    	
    	private static final String PROXY_HOST = System.getProperty("https.proxyHost", PROXY_H);
    	private static final String PROXY_PORT = System.getProperty("https.proxyPort", PROXY_P);

    right after:

    Code Block
    languagejava
    	private static final String PERFECTO_SECURITY_TOKEN = "MY_CONTINUOUS_QUALITY_LAB_SECURITY_TOKEN";
  2. Then, add:

    Code Block
    languagejava
    	//need to import org.apache.http.HttpHost;
    	private static HttpHost proxyHost = new HttpHost(PROXY_HOST, Integer.parseInt(PROXY_PORT));

    right before:

    Code Block
    languagejava
    	private static HttpClient httpClient = HttpClientBuilder.create()
  3. And, add following method:

    Code Block
    languagejava
    			.setProxy(proxyHost)

    to:

    Code Block
    languagejava
    	private static HttpClient httpClient = HttpClientBuilder.create()

PDF Formatted Reports


PDF Download after Test execution

...