APPium使用-启动参数及文档说明

APPium初步使用

一:Appium Desktop参数配置

from appium import webdriver
#配置手机及应用包相关启动参数
caps={}
caps['deviceName']='emulator-5554' 
caps['platformName']='android'
caps["platformVersion"]='9.0'
caps['appPackage']='包名
caps['appActivity']='.应用包启动项'
caps['autoGrantPermissions']=True #确保一些配置允许使用
#连接appium,访问APP
driver=webdriver.Remote('http://127.0.0.1:4723/wd/hub', caps)

点击链接查看启动参数:手机应用包启动参数详解

二:Appium Desktop录制并生成脚本

  • 启动Appium Desktop的inspector录制脚本
  • 安装python依赖:pip install Appium_Python_client
  • 增加隐式等待:python driver.implicitly_wait(10)
  • Appium 命令及文档查询

方法一:基于python-client查看appium文档

第一步,进入Appium 的github官网,搜索appium appium 或者点击github链接appium github链接
第二步,点击appium,进入视图区第一步,进入GitHub点击appium>>第三步,搜索python-client
在这里插入图片描述

第四步,点击python-client即可看到一些常用命令,或可省略前方路径直接查看当前文档: python-client文档
在这里插入图片描述

方法二:Appium的官方文档
中文版:https://learning-pytest.readthedocs.io/zh/latest/
英文原版:https://docs.pytest.org/en/latest/

发布了99 篇原创文章 · 获赞 43 · 访问量 16万+

猜你喜欢

转载自blog.csdn.net/mayanyun2013/article/details/104313548