appium python api_Appium之python API

这篇博客详细介绍了如何使用Appium的Python API进行移动应用自动化测试,包括操作元素、滑动、拖放、键盘处理、网络连接控制等多个功能。用户可以了解如何通过iOS的uiautomation和Android的uiautomator来查找和操作元素,以及如何执行滑动、缩放、键盘隐藏等操作。
摘要由CSDN通过智能技术生成

webdriver

contexts(self)

说明:返回多个会话内容

使用:driver.contexts

current_context(self)

说明:返回单个会话的内容

使用:driver.current_context

context(self)

返回current_context(self)

使用方法:driver.context

find_element_by_ios_uiautomation(self,uia_string)

说明:通过uiautomation在iOS元素中查找uia_string

参数:uia_string :iOS uiautomation库元素名称为uia_string

使用:driver.find_element_by_ios_uiautomation('.elements()[1].cells()[2]')

find_elements_by_ios_uiautomation(self, uia_string)

说明:通过uiautomation在iOS多个重复元素uia_string中查找

参数:uia_string :iOS uiautomation库元素名称为uia_string

使用:driver.find_element_by_android_uiautomator('.elements()[1].cells()[2]')

find_element_by_android_uiautomator(self, uia_string)

说明:通过uiautomation在Android元素中查找uia_string

参数:uia_string :Android uiautomation库元素名称为uia_string

使用:driver.find_elements_by_android_uiautomator('.elements()[1].cells()[2]')

find_elements_by_android_uiautomator(self, uia_string)

说明:通过uiautomation在Android多个重复元素uia_string中查找

参数:uia_string :Android uiautomation库元素名称为uia_string

使用:driver.find_elements_by_android_uiautomator('.elements()[1].cells()[2]')

find_element_by_accessibility_id(self, id)

说明:可查找元素的ID

参数:id: 一个字符串对应一个递归元素的搜索使用

ID /名称,当地的辅助功能选项利用

使用:driver.find_element_by_accessibility_id()

find_elements_by_accessibility_id(self, id)

说明:可查找元素多个相同的ID

参数:id: 一个字符串对应一个递归元素的搜索使用

ID /名称,当地的辅助功能选项利用

使用:driver.find_element_by_accessibility_id()

scroll(self, origin_el, destinat

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值