安卓robot自动化测试包经常用的方法

① 点击:  
clickOnButton(int)—Clicks on a Button with a given index. 
clickOnButton(String)—Clicks on a Button with a given text. 
clickOnCheckBox(int)—Clicks on a CheckBox with a given index.  
clickOnView(View)—Clicks on a given View.   
clickOnText(String)—Clicks on a View displaying a given text. 
clickLongOnText(String)—Long clicks on a given View.  
clickOnRadioButton(int)—Clicks on a RadioButton with a given index. 
clickOnScreen(float, float)—Clicks on a given coordinate on the screen. 
② 取得:  
getCurrentActivity()—Returns the current Activity.   
getText(String)—Returns a TextView which shows a given text.  
getView(int)—Returns a View with a given id.   
getEditText(String)—Returns an EditText which shows a given text.   
getImage(int)—Returns an ImageView with a given index.  
③ 拖拽:  
drag(float, float, float, float, int)—Simulate touching a given location and dragging it to a new location. 
④ 搜索:  
searchText(String)—Searches for a text string and returns true if at least one item is found with the expected text. 
searchEditText(String)—Searches for a text string in the EditText objects located in the current Activity.   
searchButton(String, boolean)—Searches for a Button with the given text string and returns true if at least one Button
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值