编写脚本:
打开pycharm 创建一个项目
form appium import webdriver
调用出错时可能时mac系统自带python2而自己安装的是python3,则输入以下命令即可
cd /usr/local/bin
pip3 install Appium-Python-Client
如果安装时遇到了以下问题
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
就先pip3 install --upgrade pip
然后再pip3 install Appium-Python-Client
dirver = webdriver.Remote("http://localhost:4723/wd/hub",desired_caps)
是获取服务器地址:在appium-server 中获取
运行当前脚本会打开指定app
网友评论