Running on Remote Agents

By default, drivers communicate with the local Agent listening on http://localhost:8585. However, you can explicitly provide an Agent URL (host and port) in order to run on remote agents.

public ChromeDriver(final URL remoteAddress, final ChromeOptions options)

You can also set the remote agent URL using the TP_AGENT_URL environment variable.

Remote (Cloud) Driver

If you want to use a cloud provider like SauceLabs or BrowserStack, you can use setCapabilitiy to initialize a remote driver for these cloud providers. Specify a custom capability cloud:URL that calls the service you want to use. For example, the following code would connect to your SauceLabs account when running tests:

import io.testproject.sdk.drivers.web.ChromeDriver;
import io.testproject.sdk.drivers.TestProjectCapabilityType;
ChromeOptions chromeOptions = new ChromeOptions();
ChromeDriver driver = new ChromeDriver(chromeOptions);