【问题标题】:How to use Perl script for testing Android applications using Eclipse Epic?如何使用 Perl 脚本使用 Eclipse Epic 测试 Android 应用程序?
【发布时间】:2023-04-03 02:50:02
【问题描述】:

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

【问题讨论】:

    标签: android perl testing adb


    【解决方案1】:

    我的解决方案:

    #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");
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-24
      • 1970-01-01
      • 2012-03-08
      • 1970-01-01
      相关资源
      最近更新 更多