Python+Appium自动化测试(ios+Android)

一、软件安装

安装清单:

  • JDK
  • Python
  • node.js
  • android-sdk(作者通过Android Studio安装)
  • iOS-deploy
  • brew
  • libimobiledevice依赖库
  • ideviceinstaller
  • carthage依赖库

appium-doctor(安装后可在命令行中通过命令:appium-doctor检查还少啥)

  • WebDriverAgent

Appium-Python-Client

软件清单:

Xcode

pycharm

Appium Inspector

Appium Server GUI


JDK、node.js、android-sdk、appium-doctor、Appium-Python-Client、Appium Server GUI

可以参考:appium环境配置(史上最全详细)_appium安装及环境配置-CSDN博客

补充1:node.js作者下载方式

卸载node

sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*}

官网下载包:

Node.js --- Download Node.js®

补充2:Python-Client下载

方式1:通过pip命令下载 前提:有下载了pip命令(一般下载python后都有)

可通过:pip --version命令检查

官网下载get-pip.py脚本:地址:Index of /

在命令行中,切换到get-pip.py所在的目录,然后输入以下命令进行安装:

python get-pip.py(若你下的是Python3以上命令是:python3 get-pip.py

方式2:github下载python-client

GitHub - appium/python-client: Python language bindings for Appium

官网上有下载说明:

在pycharm中安装:


Appium Inspector官网安装地址

Releases · appium/appium-inspector · GitHub


brew、 iOS-deploy、libimobiledevice、carthage安装可以参考

2023主流技术 Appium+IOS 自动化测试环境搭建-CSDN博客


WebDriverAgent(巨坑)

需要手动在官网下载代码,配置好后,局部替换Appium中的WebDriverAgent

官网地址:https://github.com/facebookarchive/WebDriverAgent

下载好后替换appium自带的webDriverAgent的里面几个文件

替换代码后配置可参考:2023主流技术 Appium+IOS 自动化测试环境搭建-CSDN博客关于#AppiumInspector#的问题,如何解决?_运维-CSDN问答

问题:关于ServerURLHere中间的http://IP地址:端口/status无法访问的问题。

有些国产的 iPhone 机器通过手机的 IP 和端口还不能访问,此时需要将手机的端口转发到 Mac 上。

相关推荐
Java方文山15 小时前
Appium+Python 实现移动应用自动化测试:从基础到实战
appium
有风南来12 天前
appium2.0+之PointerActions详解
自动化测试·appium·高级手势·pointeractions·移动设备自动化·单点触控
惜.己12 天前
appium中urllib3.exceptions.LocationValueError: No host specified. 的错误解决办法
网络·appium
惜.己13 天前
python中appium
开发语言·python·appium
TRACER~8521 天前
移动端自动化Appium框架
运维·appium·自动化
nee~1 个月前
appium
appium
amazinging1 个月前
北京-4年功能测试2年空窗-报培训班学测开-第四十四天
python·学习·appium
AIZHINAN1 个月前
Appium 简介
自动化测试·测试工具·appium
amazinging1 个月前
北京-4年功能测试2年空窗-报培训班学测开-第四十一天
python·学习·appium
amazinging1 个月前
北京-4年功能测试2年空窗-报培训班学测开-第三十九天
python·学习·appium