robotium问答

robotium问答

 

robotium集成instrumentation

robotium如何定位控件?

search类获取当前所有的view,然后根据类型或者文本去筛选,找到view后获取坐标,然后点击坐标。本质都是通过坐标点击。solo.clickonScreen方法,底层调用MotionEvent类。

MotionEvent,android.view中的类,Objectused to report movement (mouse, pen, finger, trackball) events

定位webview?

nativedriver,selenium的android版本,通过js脚本控制webview,在webview注入js脚本,然后调用nativedriver操作。

签名加上包名,确定唯一app

签名一致,两个app进程可以进行通信。

原文地址:https://www.cnblogs.com/poptest/p/5124687.html