1、启动/关闭app
启动app:open Application
关闭app:Close Application
关闭所有应用:Close All Applications
卸载应用:Remove Application
2、元素相关
点击元素:Click Elemen
点击文字:Click Text
等待页面元素出现:Wait Until Page Contains Element
等待页面出现文本:Wait Until Page Contains
等待页面不包含元素:Wait Until Page Does Not Contain Element
等待页面不包含文本:Wait Until Page Does Not Contain
3、页面滑动
滑动:swipe ${start_x} ${start_y} ${end_x} ${end_y}
滚动:Scroll ${start_locator} ${end_locator}
4、睡眠
睡眠:sleep
5、隐藏键盘
隐藏键盘:Hide Keyboard
其他:
RF变量定义:
${}定义常规变量,var
@{}定义list变量,集合
&{}定义字典变量,dictionary key|value对应关系的键值对 类似java的HashMap
${handles}数组 set variable
@{handles}集合 create list
&{dictionary}字典键值对 create dictionary
更多推荐
关键字,常用,RobotFramework,AppiumLibrary
发布评论