Foreplay
Each time you start appium automated time, we will be prompted to install appium setting and Unlock, but also have to manually confirm
That these two documents is to do what?
Appium settings: settings for network state
Unclock: used to automatically unlock (usage scenarios: the phone is in the case of the slide lock screen, it will automatically unlock and start the apk, Note: The pattern lock screen with a digital lock oh can not only be a sliding lock screen)
Solution:
Where appium at input cmd, view of the installation path appium
Into the installation path of the lib appium
I was in
100: \ Users \ Administrator \ AppData \ Roaming \ NPM \ node_modules \ appium \ node_modules \ appium-Android-driver \ lib
Open android-helpers.js file, comment out the following three lines
Respectively, in the 475 line and 486 line
This is a file even if the change over, in another to modify the file, return to the upper directory, to the next appium-android-driver's bulid \ lib
C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\build\lib
After editing service can restart appium
Use of the solution appium desktop
Note: appium desktop If you are using also you need to modify the following file, if not, modify the above files on it
100: \ Users \ Administrator \ AppData \ Local \ appium-desktop \ app-1.5.0 \ resources \ app \ node_modules \ appium \ node_modules \ appium-Android-driver \ build \ lib
Open the file android-helpers.js
return context$1$0.abrupt('return',defaultIME)
Looking down
// return _regeneratorRuntime.awrap (helpers.pushSettingsApp (the adb)); annotated return context. 1 $ $ 0.abrupt ( ' return ' , defaultIME); Added
Install both app
If the new device does both app, you can manually install the equipment
Appium setting the path
appium的安装路径\npm\node_modules\appium\node_modules\[email protected]@io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk 我的路径:C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\_io.appium.settings@[email protected]\app\build\outputs\apk\settings_apk-debug.apk
Unlock app path
appium的安装路径: \ NPM \ node_modules \ appium \ node_modules \ _appium-unlock @ @ appium-unlock 2.0.0 \ bin \ unlock_apk- debug.apk
我的路径: 100: \ Users \ Administrator \ AppData \ Roaming \ NPM \ node_modules \ appium \ node_modules \ _appium -unlock @ @ appium-unlock 2.0.0 \ bin \ unlock_apk-debug.apk