Android Robotium的自动化代码
来源:互联网 发布:sql 查询任意字段 包含 编辑:程序博客网 时间:2024/05/16 06:26
ArrayList<EditText> EditTexts = solo.getCurrentEditTexts();
solo.enterText(EditTexts.get(0), "");
solo.enterText(EditTexts.get(0), "username");
Assert.assertEquals("Doubanshuo", solo.getCurrentActivity().getTitle());
solo.enterText(0, "\n");
solo.enterText(EditTexts.get(1), "");
Assert.assertEquals("Password", EditTexts.get(1).getHint());
solo.enterText(EditTexts.get(1), "password");
solo.clickOnButton("Login");
solo.waitForActivity("doubanshuo");
solo.assertCurrentActivity("shibushihome", Home.class);
Home hact = (Home) solo.getCurrentActivity();
View iv = hact.findViewById(com.douban.shuo.R.id.button4);
solo.clickOnView(iv);
solo.waitForActivity("setting");
solo.assertCurrentActivity("shibushihome", Setting.class);
TextView quit = (TextView) solo.getCurrentActivity().findViewById(com.douban.shuo.R.id.text4);
solo.clickOnView(quit);
solo.waitForDialogToClose((long) 100);
solo.clickOnButton(0);
solo.enterText(EditTexts.get(0), "");
solo.enterText(EditTexts.get(0), "username");
Assert.assertEquals("Doubanshuo", solo.getCurrentActivity().getTitle());
solo.enterText(0, "\n");
solo.enterText(EditTexts.get(1), "");
Assert.assertEquals("Password", EditTexts.get(1).getHint());
solo.enterText(EditTexts.get(1), "password");
solo.clickOnButton("Login");
solo.waitForActivity("doubanshuo");
solo.assertCurrentActivity("shibushihome", Home.class);
Home hact = (Home) solo.getCurrentActivity();
View iv = hact.findViewById(com.douban.shuo.R.id.button4);
solo.clickOnView(iv);
solo.waitForActivity("setting");
solo.assertCurrentActivity("shibushihome", Setting.class);
TextView quit = (TextView) solo.getCurrentActivity().findViewById(com.douban.shuo.R.id.text4);
solo.clickOnView(quit);
solo.waitForDialogToClose((long) 100);
solo.clickOnButton(0);
- Android Robotium的自动化代码
- Android studio 下的Robotium自动化测试
- android自动化工具-robotium
- Android Robotium自动化测试
- android 自动化测试robotium
- ANDROID自动化测试 robotium
- Android Robotium自动化测试
- Robotium android自动化测试
- Android自动化测试之robotium
- Android Robotium自动化测试二
- 转:ANDROID自动化测试 robotium
- ANDROID自动化测试工具:ROBOTIUM
- Android Robotium自动化测试二
- Android 自动化测试—robotium
- android 使用Robotium自动化测试
- Robotium应用与Android自动化测试的研究
- Android自动化测试包robotium测试ListView的注意事项
- Robotium应用与Android自动化测试的研究
- MyBatis 动态SQL
- uCOS和uCLinux比较
- ubuntu常用命令操作指南
- Android消息处理-源码分析篇
- VS2010下如何调试Framework源代码(即FCL)
- Android Robotium的自动化代码
- Windows文件在linux下每行后出现^M字样
- 面向对象的三个基本特征
- Java的辉煌,还能延续多久?
- Oracle ORA-600[4193] 解决方法 说明
- java连接DB2
- Linux下库文件学习(一)库的基本知识
- 用NotFound MVC插件自动处理http404错误
- php 面试题