使用appium时报错:
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/y/Library/Android/sdk/platform-tools/adb -P 5037 -s 713277ae shell pm clear com.google.android.youtube' exited with code 1'; Command output: Error: java.lang.SecurityException: adb clearing user data is forbidden.
Stacktrace:
UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/y/Library/Android/sdk/platform-tools/adb -P 5037 -s 713277ae shell pm clear com.google.android.youtube' exited with code 1'; Command output: Error: java.lang.SecurityException: adb clearing user data is forbidden.
at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)
解决方法:
在caps的参数中加入:
"noReset": "True"