Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何在通过RobotFramework和Appium触发我的react本机应用程序时修复MainActivity的超时_Android_React Native_Appium_Robotframework_Expo - Fatal编程技术网

Android 如何在通过RobotFramework和Appium触发我的react本机应用程序时修复MainActivity的超时

Android 如何在通过RobotFramework和Appium触发我的react本机应用程序时修复MainActivity的超时,android,react-native,appium,robotframework,expo,Android,React Native,Appium,Robotframework,Expo,我已经使用诸如RobotFramework(RF)、Appium、Android Emulator(通过Android Studio)等工具建立了一些基本的自动化测试环境 在我的例子中,我有一个demo.robot脚本,在这个脚本中,我调用我的应用程序启动并测试事情是否存在或发生 我的应用程序是通过expo.io构建的。问题是,当我在模拟器中使用RF启动应用程序时,它会挂起,并收到以下错误消息: WebDriverException: Message: An unknown server-sid

我已经使用诸如RobotFramework(RF)、Appium、Android Emulator(通过Android Studio)等工具建立了一些基本的自动化测试环境

在我的例子中,我有一个demo.robot脚本,在这个脚本中,我调用我的应用程序启动并测试事情是否存在或发生

我的应用程序是通过expo.io构建的。问题是,当我在模拟器中使用RF启动应用程序时,它会挂起,并收到以下错误消息:

WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.<domain_name>.<app_name>' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Error executing adbExec. Original error: 'Command 'C\:\\Users\\developer1\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s emulator-5554 shell am start -W -n com.<domain_name>.<app_name>/host.exp.exponent.MainActivity -S' timed out after 60000ms'. Try to increase the 60000ms adb execution timeout represented by 'adbExecTimeout' capability
其中
appActivity:host.exp.exp.exponent.MainActivity
可通过以下途径找到:

adb shell dumpsys window windows | grep mFocusedApp
让我的应用程序在模拟器中运行并打开

如果有任何帮助,我可以看到我的应用程序有2个
android.intent.action.MAIN

adb shell pm dump com.<domaim_name>.<app_name> | grep -A 1 MAIN
        android.intent.action.MAIN:
          9535b09 com.<domaim_name>.<app_name>/host.exp.exponent.MainActivity filter 38ddb4e
            Action: "android.intent.action.MAIN"
            Category: "android.intent.category.LAUNCHER"
--
            Action: "android.intent.action.MAIN"
            Category: "android.intent.category.LEANBACK_LAUNCHER"
任何帮助都将不胜感激

adb shell pm dump com.<domaim_name>.<app_name> | grep -A 1 MAIN
        android.intent.action.MAIN:
          9535b09 com.<domaim_name>.<app_name>/host.exp.exponent.MainActivity filter 38ddb4e
            Action: "android.intent.action.MAIN"
            Category: "android.intent.category.LAUNCHER"
--
            Action: "android.intent.action.MAIN"
            Category: "android.intent.category.LEANBACK_LAUNCHER"
adb shell pm dump  com.google.android.dialer | grep -A1 MAIN
        android.intent.action.MAIN:
          a5f0def com.google.android.dialer/.extensions.GoogleDialtactsActivity filter 7f80bcc
            Action: "android.intent.action.MAIN"
            Category: "android.intent.category.DEFAULT"