`
MyEyeOfJava
  • 浏览: 1128445 次
  • 性别: Icon_minigender_1
  • 来自: 北京
博客专栏
7af2d6ca-4fe1-3e9a-be85-3f65f7120bd0
测试开发
浏览量:70302
533896eb-dd7b-3cde-b4d3-cc1ce02c1c14
晨记
浏览量:0
社区版块
存档分类
最新评论

[Android]robotium typeText与enterText区别

阅读更多

solo.typeText和solo.enterText方法都可以对EditeText进行测试,达到的测试目的是一样的。存在几点不同:

1、实现上,typeText方法是robotium框架调用系统Instrumentation类里面的sendStringSync方法来实现的;enterText是调用TextView里面setText方法来实现的。

2、显示上,typeText在测试过程中能看到输入的痕迹;enterText则没有输入痕迹。

so 使用typeText的时候没办法输入中文。

 

附件是一个测试工程。

分享到:
评论

相关推荐

    typeText与enterText的区别

    雾山的Robotium学习笔记---typeText与enterText的区别http://blog.csdn.net/tt75281920/article/details/26944091

    ANDROID 直接TYPEC转串的通信DEMO及开发文档

    ANDROID设备 直接TYPEC转串的通信DEMO及开发文档,无需要转接头,方便实用,通信方便快捷,开发简单易用,亲自测试,非常好用

    Android代码-Text Edit

    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

    Android重力感应传感器小球 Sensor.TYPE_ACCELEROMETER

    Android代码-dlib-android-app

    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源码: 透明圆角Dialog

    android:type="linear" android:endColor="#0000FF" android:startColor="#FFFFFF" /> android:width="1.0px" android:color="#33B5E5" /> android:bottomLeftRadius="10dip" android:...

    Android开发EditText属性.txt

     android:drawablePadding设置text与drawable(图片)的间隔,与drawableLeft、drawableRight、drawableTop、drawableBottom一起使用,可设置为负数,单独使用没有效果。 android:drawableRight在text的右边输出一...

    Android MediaProjection截屏&录屏-适配Android

    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可用

    Learning Android

    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 ...

    Android代码-android-async-http

    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期末复习题01

    通常 Android会根据Intent 中包含的其它属性的信息,比如action、data/type、category进行查找,最终找到一个与之匹配的目标组件。但是,如果 component这个属性有指定的话,将直接使用它指定的组件,而不再执行上述...

    Android EditText限制输入字符类型的方法总结

    Android EditText限制输入字符类型的方法... Android:inputType=textPassword 在java文件中,可以用 myEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); 当然,还有更多的其他属性用来进行输入设置。

    androidstudio.docx

    ](https://img-blog.csdnimg.cn/20190826102746758.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM3ODI2OTUy,size_16,color_FFFFFF,t_70) ...

    Android操作通话记录

    来电:CallLog.Calls.INCOMING_TYPE (常量值:1) 已拨:CallLog.Calls.OUTGOING_TYPE(常量值:2) 未接:CallLog.Calls.MISSED_TYPE(常量值:3) 查看源码中的声明: <provider android:name="CallLogProvider...

    ANDROID实验报告组件布局.pdf

    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代码-Android自定义相机实现身份证拍照,并加入自动对焦与图片不规则裁剪

    Android自定义身份证相机-IDCardCamera 效果图: 功能特点 自定义相机界面 支持开启闪光灯 支持手动触摸屏幕对焦 支持自动对焦 支持图片自动裁剪 支持图片手动不规则裁剪 2 使用 Step 1. 添加JitPack仓库 在...

    Font_sound.rar_STARAPTRUETYPE_android font_android true type_and

    android,Font自定义,选用系统之外的truetype字体库,实现了,个性化文字的独特显示样式,增加了控件声音处理,不同文字效果,配合不同的音乐控制,并处理了多个控件播放问题上的免交叉问题。

    Get清风android实验2界面设计:基本组件.doc

    android:layout_height="wrap_content"/> <EditText android:id="@+id/phone" android:inputType="text"phone" android:layout_width="200sp" android:layout_height="wrap_content"/> <!-- 在主布局中添加部门...

    android实验2界面设计:基本组件.doc

    --> <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_...

Global site tag (gtag.js) - Google Analytics