抓包_Appium安装和配置

1.安装配置Java SDK

-【没有安装后面可能会报错】
下载链接:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
(1)新建->变量名"JAVA_HOME",变量值"C:\Java\jdk1.8.0_05"(即JDK的安装路径)
(2)编辑->变量名"Path",在原变量值的最后面加上“;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin”
(3)新建->变量名“CLASSPATH”,变量值“.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar”

2.安装配置android-studio

下载链接:https://developer.android.google.cn/studio/
(1)file->settings->Appearance->system settings->andiord SDK->SDKPlatforms下勾选需要安装的SDK版本并记录SDK路径
新建环境变量,n:“ANDROID_HOME”,v:“C:\Users\Administrator\AppData\Local\Android\Sdk"这里是前面的路径
(3)Path添加”;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;
(4)cmd验证

adb
Android

3.安装配置Appium

下载链接:https://github.com/appium/appium-desktop/releases
(1)usb链接手机:
打开usb调试
打开usb调试(安全设置)
没有打开后面会报错
-【Original error:‘XXX shell pm clear XXX’】
-【‘XXX does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package XXX’】
(2)获取appPackage和appActivity的值:
cmd运行

adb shell
dumpsys activity | grep mFocusedActivity
# adb shell dumpsys activity activities | grep mFocusedActivity

(3)点开始
(4)点右上角放大镜
(5)设置对象

{
  "platformName": "Android",
  "deviceName": "MI_pro",
  "appPackage": "com.tencent.mm",
  "appActivity": ".ui.LauncherUI"
}

(6)点击save,点击start session
(7)点上方眼睛录制动作

你可能感兴趣的:(python_爬虫)