When using Appium for app automation, solve the problem that you need to manually install Unlock and AppiumSetting every time you use an Android phone

Today, I tried the automation of the app with a real Android machine, and found that when opening an app, there will be problems that require us to manually install Unlock and AppiumSetting. It was automatically installed in the simulator before, without manual clicking, but on the real machine, this will affect efficiency, showing us a bit stupid.

My appium version is Appium v1.7.1

After consulting the information, I learned that you can modify the android-helpers.js file in the appium installation directory. The specific operations are as follows:

一, appium-desktop \ resources \ app \ node_modules \ appium \ node_modules \ appium-Android-driver \ lib

Modify the number of code lines [355, 522, 526] and log them out, as shown in the figure below:

 

二, appium-desktop \ resources \ app \ node_modules \ appium \ node_modules \ appium-Android-driver \ build \ lib

Modify the number of lines of code [919, 1366, 1380] and log them out,

In the number of lines of code [920, 1367, 1381], add return context$1$0.abrupt('return',defaultIME); // add this line of code

The details are as follows:

For the lower version of Appium, you can check the following link to set:

https://blog.csdn.net/hszxd479946/article/details/78951513

 

Guess you like

Origin blog.csdn.net/qq_25162431/article/details/115012317