private static Capabilities createCapabilities(Client client, String testName, String id) {

    MutableCapabilities capabilities;
    if (!client.isApp()) {
      capabilities = buildBrowserCapabilities(client);
    } else {
      capabilities = buildAppCapabilities(client);
    }
    // Remote test identifier
    if (testName != null && !testName.isEmpty()) {
      capabilities.setCapability("name", testName);
    }
    if (id != null && !id.isEmpty()) {
      capabilities.setCapability("id", id);
    }
    for (String capabilityName : client.getCapability().getExtraCapabilities().keySet()) {
      logger.debug("extraCapabilites : " + capabilityName + ": " + client.getCapability().getExtraCapabilities().get(capabilityName));
      capabilities.setCapability(capabilityName, client.getCapability().getExtraCapabilities().get(capabilityName));
    }
    logger.debug("Capabilites for " + client.toString() + " = \r\n" + capabilities);
    return capabilities;
  }
/**
Creates a Capabilities object based on the given Client object.

@param client   kite config object
@param testName name for individual test case
@return the capabilities for creating webdriver
KITE-Framework/src/main/java/org/webrtc/kite/WebDriverFactory.java