发现一个网址的内容比较好,就转过来了
#默认系统语言对应的Strings.xml文件内的数据。
get_app_string()
#查找某一个语言环境对应的字符串文件Strings.xml内数据
get_app_string(String language)
#按下某个键,具体哪个键由key值决定,key值定义在AndroidKeyCode类中
send_key_event(int key)
#获取当前activity,比如(.ApiDemos)
current_activity()
#根据bundleId来判断该应用是否已经安装
is_app_installed(String bundleId)
#安装app,appPath为应用的本地路径
install_app(String appPath)
#卸载app.bundleId在
android中代表的是报名,而在ios中有专门的bundleId号。
remove_app(String bundleId)
#关闭应用,其实就是按home键把应用置于后台
close_app()
#启动应用
launch_app()
#先closeApp然后在launchAPP
reset_app()
#将字符数组用64位格式写到远程目录的某个文件中。也可以理解为把本地文件push到设备上。
push_file(String remotePath, byte[] base64Data)
#将设备上的文件pull到本地硬盘上
pull_file(String remotePath)
#将设备上的文件夹pull到本地硬盘上,一般远程文件为/data/local/tmp下的文件。
pull_folder(String remotePath)
#设置
手机的网络连接状态,可以开关蓝牙、wifi、数据流量。通过NetworkConnectionSetting中的属性来设置各个网络连接的状态。
set_network_connect(NetworkConnectionSetting connection)
#得到当前网络的状态
get_network_connection()
#ios隐藏键盘
hide_keyboard()
#隐藏键盘,只能用于ios上。
hide_keyboard(String strategy, String keyName)
#执行一个touch动作,该touch动作是由TouchAction封装的。
perform_touchAction(TouchAction touchAction)
#点击element控件中心点按下,duration*5毫秒秒后松开,如此重复fingers次。
tap(int fingers, WebElement element, int duration)
#点击(x,y)点按下,duration*5毫秒后松开,如此重复fingers次。
tap(int fingers, int x, int y, int duration)
#从(startx,starty)滑到(endx,endy),分duration步滑,每一步用时是5毫秒。
swipe(int startx, int starty, int endx, int endy, int duration)
#2个手指操作控件,从对角线向中心点滑动。
pinch(WebElement el)
#以(x,y)为基准,计算得出(x,y-100),(x,y+100)两个点,然后2个手指按住这两个点同时滑到(x,y)
pinch(int x, int y)
#与pinch(el)的动作刚好相反。两个手指由控件的中心点慢慢向控件的左顶点后右底点滑动。
zoom(WebElement el)
#和pinch(x,y)相反。两个手指从(x,y)点开始向(x,y-100)和(x,y+100)滑动。
zoom(int x, int y)
#锁屏多少秒后解锁
lock_screen(int seconds)
#模拟摇晃手机
shake()
#滚动到某个text属性为指定的字符串的控件
scroll_to(String text)
#滚动到某个text属性包含传入的字符串的控件
scroll_to_exact(String text)
#设置上下文
context(String name)
#可用上下文
get_context_handles()
#当前上下文
get_context()
#设置屏幕横屏或者竖屏
rotate(ScreenOrientation orientation)
#获取当前屏幕的方向
get_orientation()
#利用ios中的uiautomation中的属性来获取控件
find_element_by_ios_uiautomation(String using)
#和上面一样,不过获得的是多个控件
find_elements_by_ios_uiautomation(String using)
#利用android的uiautoamtor中的属性来获取单个控件。
find_element_by_android_uiautomator(String using)
#和上面一样,但是该方法获得是多个控件
find_elements_by_android_uiautomator(String using)
#利用accessibility id来获取单个控件
find_element_by_accessibilityid(String using)
#利用accessibility id来获得多个控件
find_elements_by_accessibilityid(String using)
'''AppiumDriver的辅助类,主要针对手势操作,比如滑动、长按、拖动等。
TouchAction的原理是讲一系列的动作放在一个链条中,然后将该链条传递给服务器。
服务器接受到该链条后,解析各个动作,逐个执行。'''
TouchAction()
#在控件上执行press操作
press(WebElement el)
#在坐标为(x,y)的点执行press操作
press(int x, int y)
#在控件el的左上角的x坐标偏移x单位,y左边偏移y单位的坐标上执行press操作。
press(WebElement el, int x, int y)
#释放操作,代表该系列动作的一个结束标志。
release()
move_to(WebElement el)
#以(x,y)点为目标,从另一个点移动到该目标上
move_to(WebElement el, int x, int y)
#在控件的中心点上敲击一下
tap(WebElement el)
#在(x,y)点轻击一下
tap(int x, int y)
#以控件el的左上角为基准,x轴向右移动x单位,y轴向下移动y单位。在该点上轻击。
tap(WebElement el, int x, int y)
#代表一个空操作,等待一段时间
wait_action()
#等待ms秒
wait_action(int ms)
#控件长按
long_press(WebElement el)
#点长按
long_press(int x, int y)
#偏移点长按
long_press(WebElement el, int x, int y)
#取消执行该动作
cancel()
#执行该动作
http://www.51testing.com/html/15/n-1408815.html
- Appium python API 总结
Appium python api 根据testerhome的文章,再补充一些文章里面没有提及的API [TOC] [1]find element driver 的方法 注意:这几个方法只能通过sel ...
- appium+python自动化☞appium python api大全
整理了一些常用的appium python api,供学习使用...
- Appium===Appium+Python API(转)
Appium+python自动化8-Appium Python API 前言: Appium Python API全集,不知道哪个大神整理的,这里贴出来分享给大家. 1.contexts contex ...
- Appium Python API 汇总(中文版)
网络搜集而来,留着备用,方便自己也方便他人.感谢总结的人! 1.contexts contexts(self): Returns the contexts within the current ses ...
- Appium Python API 汇总
最近在学习Python自动化,网络搜集而来,留着备用, 方便自己也方便他人.感谢总结的人! 1.contexts contexts(self): Returns the contexts within ...
- Appium+Python API相关知识了解
首先,要先了解,官方Appium API // https://testerhome.com/topics/3144 刚开始的时候,没有看官方API,然后在网上瞎找学习资料,发现python相关的很少 ...
- appium python api收集
1.contexts contexts(self): Returns the contexts within the current session. 返回当前会话中的上下文,使用后可以识别H5页面的 ...
- Appium Python API 中文版
Appium_Python_Api文档 1.contextscontexts(self): Returns the contexts within the current session. 返回当前会 ...
- Appium Python API
1.contexts contexts(self): Returns the contexts within the current session. 返回当前会话中的上下文,使用后可以识别H5页面的 ...
随机推荐
- Leetcode OJ : Implement strStr() [ Boyer–Moore string search algorithm ] python solution
class Solution { public: int strStr(char *haystack, char *needle) { , skip[]; char *str = haystack, ...
- leetcode@ [303/304] Range Sum Query - Immutable / Range Sum Query 2D - Immutable
https://leetcode.com/problems/range-sum-query-immutable/ class NumArray { public: vector<int> ...
- Java文件合并
文件分割与合并是一个常见需求,比如:上传大文件时,可以先分割成小块,传到服务器后,再进行合并.很多高大上的分布式文件系统(比如:google的GFS.taobao的TFS)里,也是按block为单位, ...
- ACCESS-类型转换函数
类型转换涵数: 函数 返回类型 expression 参数范围 CBool Boolean 任何有效的字符串或数值表达式. CByte Byte 0 至 ...
- Javascript(jQuery)中绑定页面上所有按钮点击事件的几种方式
方法一:使用document对象查找所有的按钮 [javascript] view plain copy 在CODE上查看代码片派生到我的代码片 //按照dom的方式添加事件处理 function B ...
- jq向上无缝滚动
<!-- -------------摇奖排行榜--------------- --> <div class="Top_Record"> <div cl ...
- android 数据存储操作之SQLite
一. SQLite介绍 SQLite是android内置的一个很小的关系型数据库. 二. SQLiteOpenHelper的使用方法 ①SQLiteOpenHelper是一个辅助类来管理数据库的创建和 ...
- ecshop中index.dwt文件分析
对于ecshop新手来说,这篇总结值得关注. 对于没有web编程基础的同学来说,ecshop模板里面有两个文件特别重要, 但是这两个文件同时也很不好理解,分别是index.dwt和style.css. ...
- Genymotion - 强大好用高性能的 Android 模拟器 (在电脑流畅运行APK安卓软件游戏的利器)
随着 Android 系统的应用和游戏越来越丰富,甚至有些比起Windows.Mac上的软件更加好用好玩,因此很多人都希望能在电脑上也能玩到安卓的游戏或APP. 我们曾推荐过 BlueStacks,而 ...
- [Sciter系列] MFC下的Sciter–1.创建工程框架
Sciter SDK中提供的Win32下例程很多,唯独使用很多(对我个人而言)的MFC框架下Sciter程序的构建讲的很少,虽然MFC有这样那样的诟病,但是不可否认的是编写一般的小项目,这仍然是大 ...