solo.typeText和solo.enterText方法都可以对EditeText进行测试,达到的测试目的是一样的。存在几点不同:
1、实现上,typeText方法是robotium框架调用系统Instrumentation类里面的sendStringSync方法来实现的;enterText是调用TextView里面setText方法来实现的。
2、显示上,typeText在测试过程中能看到输入的痕迹;enterText则没有输入痕迹。
so 使用typeText的时候没办法输入中文。
附件是一个测试工程。
相关推荐
雾山的Robotium学习笔记---typeText与enterText的区别http://blog.csdn.net/tt75281920/article/details/26944091
ANDROID设备 直接TYPEC转串的通信DEMO及开发文档,无需要转接头,方便实用,通信方便快捷,开发简单易用,亲自测试,非常好用
Text Edit for Android By Paul Mach (paulmach at gmail.com) SUMMARY Simple notepad app to open, edit and save text files to and from the SD card. ** Some features -- open email attachments -- change ...
Android重力感应传感器小球 Sensor.TYPE_ACCELEROMETER
dlib-android-app See http://dlib.net for the main project documentation. See dlib-android for JNI lib. Refer to dlib-android/jni/jnilib_ex Grap the source $ git clone ...
android:type="linear" android:endColor="#0000FF" android:startColor="#FFFFFF" /> android:width="1.0px" android:color="#33B5E5" /> android:bottomLeftRadius="10dip" android:...
android:drawablePadding设置text与drawable(图片)的间隔,与drawableLeft、drawableRight、drawableTop、drawableBottom一起使用,可设置为负数,单独使用没有效果。 android:drawableRight在text的右边输出一...
Android Media...1、解决Android Q中java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION 异常 2、targetSdk 32可用
Along the way, you'll also build your own toolbox of code patterns that will help you program any type of Android application with ease. Get an overview of the Android platform, and how this ...
Asynchronous Http Client for Android An asynchronous, callback-based Http client for Android built on top of Apache's HttpClient libraries. Changelog See what is new in version 1.4.9 released on 19th...
通常 Android会根据Intent 中包含的其它属性的信息,比如action、data/type、category进行查找,最终找到一个与之匹配的目标组件。但是,如果 component这个属性有指定的话,将直接使用它指定的组件,而不再执行上述...
Android EditText限制输入字符类型的方法... Android:inputType=textPassword 在java文件中,可以用 myEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); 当然,还有更多的其他属性用来进行输入设置。
](https://img-blog.csdnimg.cn/20190826102746758.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM3ODI2OTUy,size_16,color_FFFFFF,t_70) ...
来电:CallLog.Calls.INCOMING_TYPE (常量值:1) 已拨:CallLog.Calls.OUTGOING_TYPE(常量值:2) 未接:CallLog.Calls.MISSED_TYPE(常量值:3) 查看源码中的声明: <provider android:name="CallLogProvider...
content" android:gravity="left" android:minWidth="200px" android:inputType="textPassword" android:id="@+id/ETpwd"/> </TableRow> <TableRow> <TextView /> <Button android:id="@+id/Btok" android:layout_...
Android自定义身份证相机-IDCardCamera 效果图: 功能特点 自定义相机界面 支持开启闪光灯 支持手动触摸屏幕对焦 支持自动对焦 支持图片自动裁剪 支持图片手动不规则裁剪 2 使用 Step 1. 添加JitPack仓库 在...
android,Font自定义,选用系统之外的truetype字体库,实现了,个性化文字的独特显示样式,增加了控件声音处理,不同文字效果,配合不同的音乐控制,并处理了多个控件播放问题上的免交叉问题。
android:layout_height="wrap_content"/> <EditText android:id="@+id/phone" android:inputType="text"phone" android:layout_width="200sp" android:layout_height="wrap_content"/> <!-- 在主布局中添加部门...
--> <TextView android:text="@string/phone" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <EditText android:id="@+id/phone" android:inputType="text"phone" android:layout_...