App activity is never started the app is running on the screen record

0

Hi,

I am trying to run test on Android app with Appium and TestNG.
At first I used empty desired capabilities but then I discovered that adding following caps helped to certain users on this forum:
capabilities.setCapability("appPackage", "com.everfx");
capabilities.setCapability("appActivity", "com.zoontek.rnbootsplash.RNBootSplashActivity");
capabilities.setCapability("appWaitPackage", "com.everfx");
capabilities.setCapability("appWaitActivity", "com.zoontek.rnbootsplash.RNBootSplashActivity");
capabilities.setCapability("appWaitDuration", "50000");

It is interesting, because I thought that AWS Device Farm is overriding any capabilities that appium server is receiving.

Unfortunately it didn't help and I am still received the same error:

Failed to invoke configuration method test.BaseTestClass.setUp:Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.everfx' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: 'com.zoontek.rnbootsplash.RNBootSplashActivity' or 'com.everfx.com.zoontek.rnbootsplash.RNBootSplashActivity' never started. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting

Then I decided to change "appWaitActivity" to receive ".MainActivity", as Appium might skip seeing splashscreen, however it didn't help either. Service was still expecting to see "com.zoontek.rnbootsplash.RNBootSplashActivity" which might mean that capabilities are not being overridden at all.

So question is how to pass capabilities to aws device farm properly?
And how to overcome the issue that tests are not seeing app?

已提问 4 年前964 查看次数
7 回答
0

Hi:

Thanks for reaching out. Can you please provide a run URL so that I can further debug the issue? Thanks.

Andy

已回答 4 年前
0

Hi guys,

Can you please take a look into provided link and give me some suggestions regarding Appium not being able to see launched application

https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-east-2#/projects/a97a62fe-ee08-4056-bd65-fd9c2892e8ba/runs/7cdcfd70-9a1e-4a2b-9446-c4bfebac11b9

已回答 4 年前
0

Error : Found package: 'com.everfx' and fully qualified activity name : 'com.everfx.MainActivity

Can you please verify if capabilities are set correctly. Looks like appWaitActivity is set incorrectly which should be "com.everfx.MainActivity". Please try running the test again with code as below.

capabilities.setCapability("appPackage", "com.everfx");
capabilities.setCapability("appActivity", "com.zoontek.rnbootsplash.RNBootSplashActivity");
capabilities.setCapability("appWaitPackage", "com.everfx");
capabilities.setCapability("appWaitActivity", "com.everfx.MainActivity");
capabilities.setCapability("appWaitDuration", "50000");

Please let us know if you still seeing any issue.

已回答 4 年前
0

Thank you for your answer, however it didn't help to resolve the issue.
I am putting the value you've given into desired capabilities, however appium seems to ignore my those capabilities.
Appium is still expecting to find app by default: "Original error: 'com.zoontek.rnbootsplash.RNBootSplashActivity' or 'com.everfx.com.zoontek.rnbootsplash.RNBootSplashActivity' never started."

So question is how to effectively override desired capabilities at AWS device farm so appium at device farm would use the ones overridden?

已回答 4 年前
0

Can you try replacing the Appium command in your test spec file with the following:

    appium --log-timestamp
    --default-capabilities "{"deviceName": "$DEVICEFARM_DEVICE_NAME", "platformName":"$DEVICEFARM_DEVICE_PLATFORM_NAME",
    "appPackage":"com.everfx", "udid":"$DEVICEFARM_DEVICE_UDID", "platformVersion":"$DEVICEFARM_DEVICE_OS_VERSION",
    "chromedriverExecutable":"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE","appActivity":"com.zoontek.rnbootsplash.RNBootSplashActivity","appWaitActivity":"com.everfx.MainActivity"}"

This appium command does not specify your app package, but only encoded the app package and activity names in the appium server as default capabilities.

Edited by: raygader-aws on Oct 21, 2020 8:10 PM

已回答 4 年前
0

Thank you, both of your suggestions helped me a lot!
The issue is resolved now

已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则