diff --git a/appium-tests/android/android.spec.js b/appium-tests/android/android.spec.js index ad448a3..d21959f 100644 --- a/appium-tests/android/android.spec.js +++ b/appium-tests/android/android.spec.js @@ -115,6 +115,16 @@ describe('Camera tests Android.', function () { if (!options) { options = {}; } + // assign default values + if (!options.hasOwnProperty('allowEdit')) { + options.allowEdit = true; + } + if (!options.hasOwnProperty('destinationType')) { + options.destinationType = cameraConstants.DestinationType.FILE_URI; + } + if (!options.hasOwnProperty('sourceType')) { + options.destinationType = cameraConstants.PictureSourceType.CAMERA; + } return driver .context(webviewContext) diff --git a/appium-tests/ios/ios.spec.js b/appium-tests/ios/ios.spec.js index 9e7c3e1..1c5f65d 100644 --- a/appium-tests/ios/ios.spec.js +++ b/appium-tests/ios/ios.spec.js @@ -128,6 +128,16 @@ describe('Camera tests iOS.', function () { if (!options) { options = {}; } + // assign defaults + if (!options.hasOwnProperty('allowEdit')) { + options.allowEdit = true; + } + if (!options.hasOwnProperty('destinationType')) { + options.destinationType = cameraConstants.DestinationType.FILE_URI; + } + if (!options.hasOwnProperty('sourceType')) { + options.destinationType = cameraConstants.PictureSourceType.CAMERA; + } return driver .context(webviewContext)