All,
I have a problem to solve.
Say I want to add multiple devices dynamically, Input from a JSON file as below
{
“Emulator” : [
{
“platformName” : “Android”,
“platformVersion”: “8.1.0”,
},
{
“platformName” : “Android”,
“platformVersion”: “7.1.1”,
}]
}
I want to create my capabilities based on this JSON object.
I am unable to come up with an approach to inject these JSON instances into getMultiCapabilities properties.
I am stuck here, after which i thought i will ask to appium experts if I can get some recommendations.
exports.config = {
seleniumAddress : url,
framework: “jasmine”,
getPageTimeout: 30000, // increase timeout alloted for page load, fixes issues with deep link logins in Firefox
getMultiCapabilities : function () {
var multiCapabilities = [];
var count = 0;
var deferred = q.defer();
for (var list in Dlist) {
if (list.toUpperCase == 'EMULATOR') {
for (var emulator in list) {
q.resolve([{ "platformName": emulator.platformName}]);
}
}
}
return deferred.promise;
},
specs: [‘firstSpec.js’]
}
Any help would be greatly appreciated.