appium+python resolves problems with installing unlock and appiumsetting Every time code is run

Source: Internet
Author: User

Appium+python solve the problem of installing unlock and appiumsetting on every run code (some Android models)

1, modify the Android-helpers.js file under Appium-android-driver\lib

Installation path \appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-driver\lib\ Android-helpers.js

Await Adb.install (Unicodeimepath, {replace:false});---//comment out

Await Helpers.pushsettingsapp (ADB);---//comment out

Await Helpers.pushunlock (ADB);---//comment out

2, modify the Android-helpers.js file under Appium-android-driver\build\lib

Installation path \appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-driver\build\lib\ Android-helpers.js

A,//return _regeneratorruntime.awrap (Adb.install (_appiumandroidime.path, {replace:false}));--//commented out

B, return Context$1$0.abrupt (' return ', defaultime);//---a new b

C,//return _regeneratorruntime.awrap (Helpers.pushsettingsapp (ADB));--//Comment out

D, return Context$1$0.abrupt (' return ', defaultime);//--c new D below

E,//return _regeneratorruntime.awrap (Helpers.pushunlock (ADB));----//commented out

F, return Context$1$0.abrupt (' return ', defaultime);//---E under new f

Modify 1 and 2 and save, restart Appium, run the code, and start the app normally.

Appium+python troubleshoot problems with installing unlock and appiumsetting every time that you run code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.