拖曳滴咖啡 [英] Drag & Drop Espresso
本文介绍了拖曳滴咖啡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以执行拖放操作?通过Espresso放下动作?为了接受自动化测试中的某些条件,我需要向下(直线)向下移动一个视图.
Is it possible to perform drag & drop action via Espresso? I need to move one view down (in straight line) in order to accept some conditions in my automation test.
推荐答案
您可以使用GeneralSwipeAction进行拖放操作.放下.
You can use GeneralSwipeAction to perform drag & drop.
public static ViewAction swipeUp() {
return new GeneralSwipeAction(Swipe.FAST, GeneralLocation.BOTTOM_CENTER,
GeneralLocation.TOP_CENTER, Press.FINGER);
}
您也可以自定义位置以满足您的要求.
You can customize the location to meet your requirement as well.
这篇关于拖曳滴咖啡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文