一、Appium_Python_Client介绍
Appium的实用方法都藏在Client的源码里,对于driver和webelement实例,均有对应的元素查找方法(webelement查找的是下面的子元素),有些儿专门针对手机的函数,则需要在这个Client安装后方可使用。
(以下内容转自:http://testerhome.com/topics/1166)
appium为了实现自己的find查找方式,首先自定义了一个MobileBy类,给这个类对象塞入了它定义的一些扩展属性,这些属性的值会通过webdriver协议推送到server端去识别和执行,为了让这些属性运用到find方法中,appium很好地继承和扩展了webdriver.Remote,然后通过调用driver实例的find_element和find_elements两个核心方法实现元素查找,所以,既然是扩展,appiumdriver实例可以使用seleniumdriver的所有关于元素查找的实例方法,他们的列表我们就可以整理出来了
seleniumdriver
find_element_by_id
find_elements_by_id
find_element_by_name
find_elements_by_name
find_element_by_link_text
find_elements_by_link_text
find_element_by_partial_link_text
find_elements_by_partial_link_text
find_element_by_tag_name
find_elements_by_tag_name
find_element_by_xpath
find_elements_by_xpath
find_element_by_class_name
find_elements_by_class_name
find_element_by_css_selector
find_elements_by_css_selector
appiumdriver
find_element_by_ios_uiautomation
find_elements_by_ios_uiautomation
find_element_by_android_uiautomator
find_elements_by_android_uiautomator
find_element_by_accessibility_id
find_elements_by_accessibility_id
二、Appium_Python_Client的使用
安装完成后,要引用一下才可以使用。我们通常引用webdriver的时候是使用下面的命令的:
from selenium import webdriver
可是我们要使用appium_python_client中的函数,就要改成下面的引用方法:
from appium import webdriver
然后在setup()函数中再初始化driver如下:
self.driver=webdriver.Remote('http://localhost:4723/wd/hub',desired_caps)
引时便可以调用appium的专用方法了!!
相关推荐
资源分类:Python库 所属语言:Python 资源全名:Appium_Python_Client-2.0.0rc3-py3.9.egg 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
Appium-Python-Client-2.6.0.tar,若使用python脚本执行appium,则需要此客户端
Appium-Python-Client-0.26 最新可用 appium的python包
Appium-Python-Client-0.20
ios里python连接appium的模块:Appium-Python-Client-0.22.tar.gz
appium+python环境配置教程,包含各种工具报下载路劲,希望有助于大家
Appium-Python-Client-0.28.tar.gz
Appium-Python-Client-0.24.tar
windows下appium的环境配置之一的软件
Appium-Python-Client0.12,若使用python脚本执行appium,则需要此客户端
好难找的资源,好不容易找到了,传上来跟大家分享.
对手机自动化测试感兴趣的朋友可以看一看:资源准备 1. jdk1.8.0 2. android-sdk-windows 3. python3.5.2(python2.7安装方法一样,由于先安装了Python3.5,就没有修改) ...6. Appium-Python-Client
集成了appium+django+appiumClient,可以直接运行django和自动化测试项目
1、mac部署针对ios的UI自动化测试环境 2、适用框架python+appium+allure框架 3、包括工具:pycharm、xcode、appium-mac、appium-python-client 4、WebDriverAgent的配置
Python https://github.com/appium/python-client Java https://github.com/appium/java-client JavaScript (Node.js) https://github.com/admc/wd Objective C https://github.com/appium/selenium-objective-c ...
用于测试自动化的OpenSTF + Appium Client 库提供了用于测试自动化的基本功能,该功能允许从OpenSTF服务器分配电话,初始化与它的adb连接并为其启动appium服务器。 基本思想是对具有最低要求的远程openstf设备场进行...
介绍使用mitproxy代理工具做Android自动化Mock数据测试环境搭建创建虚拟环境(python 3.7)python3.7 -m venv /Users/xinxi/PycharmProjects/mitmproxytest/venv or virtualenv venvsource venv/bin/activate 激活虚拟...
1.0 python-appium-client 连接真机、模拟器.pdf
pip install Appium-Python-Client 克隆项目: git clone https://github.com/gunesmes/appium-ios-automation-sample 怎么跑 ####设置应用程序路径 desired_caps[ ' app ' ] = os.path.join( ' path/to/project/...