Authentication with Appium
tip
Authentication as a user is performed using an accessKey.
The Access Key can either be passed as part of the capabilities or as part of the URL.
Capabilities authentication
For accessKey, use the following convention:
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("accessKey", "<accessKey>");
AppiumDriver driver = new AndroidDriver(new URL(cloudurl + "/wd/hub/"), dc);
URL authentication
For accessKey, use the following convention:
AppiumDriver driver = new AndroidDriver(new URL("http://:" + accessKey + "@" + host+":" + port + "/wd/hub/"), dc);