addAppiumPrefix function
Returns desired capabilities with appium prefix
Implementation
Map<String, dynamic> addAppiumPrefix(Map<String, dynamic> desired) {
var w3cCapabilities = [
'browserName',
'browserVersion',
'platformName',
'acceptInsecureCerts',
'pageLoadStrategy',
'proxy',
'setWindowRect',
'timeouts',
'unhandledPromptBehavior',
'strictFileInteractability'
];
return desired.map((k, v) {
if (w3cCapabilities.contains(k) || k.contains(':')) {
return MapEntry(k, v);
}
return MapEntry('appium:$k', v);
});
}