android - 如何使用 Perl 脚本测试使用 Eclipse Epic 的 Android 应用程序?

标签 android perl testing adb

我正在为 Android 应用程序进行 Perl 测试。如何使用 Perl 脚本通过 Eclipse Epic 测试 Android 应用程序?

最佳答案

我的解决方案:

#use strict;
#use warnings;

system("adb shell am start -a com.android.intent.action.MAIN -n com.android.mms/.ui.ConversationList");

sleep(0);

system("adb shell am start -a com.android.intent.action.MAIN -n com.android.mms/.ui.ComposeMessageActivity");

system("adb shell input text 'Anji'");

sleep(2);

system("adb shell input keyevent 20");

sleep(2);

system("adb shell input text '9491407690'");

sleep(4);

system("adb shell input keyevent 21");

sleep(2);

system("adb shell input keyevent 66");

system("adb shell input keyevent 20");

system("adb shell input keyevent 20");

sleep(2);

system("adb shell input keyevent 66");

sleep(2);

system("adb shell input keyevent 19");

sleep(0);

system("adb shell input keyevent 66");

sleep(0);

system("adb shell input keyevent 5");

sleep(0);

system("adb shell input keyevent 4");

sleep(0);

system("adb shell input text 'callsuccess'");

sleep(4);

system("adb shell input keyevent 21");

system("adb shell input keyevent 66");

sleep(0);

system("adb shell input keyevent 19");

system("adb shell input keyevent 4");

system("adb shell input keyevent 4");

system("adb shell input keyevent 66");


system("adb shell am start -a com.android.intent.action.MAIN -n com.android.launcher/.Launcher");

关于android - 如何使用 Perl 脚本测试使用 Eclipse Epic 的 Android 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8237215/

相关文章:

perl - perl中\0是什么意思?

windows - 如何在Windows 10中的perl> = 5.18中强制为输出文件设置代码集cp1252?

ruby-on-rails - Rails + RSpec 问题

testing - 网站测试

Android:通过ADB的屏幕触摸事件

android - 在 Android 中缓存对象?

regex - Perl 中字符串之间的字符匹配计数

Java Spring Boot 测试 : How to exclude java configuration class from test context

java - 用非零退出值完成

android - WebView.flingScroll() 是做什么的?