zero tests to run and com.google.android.apps.chrome.Main does not exist

0

Hi,

I run tests on Web app mobile but I have this error : Activity class {com.android.chrome/com.google.android.apps.chrome.Main} does not exist. And 0 tests to run.

I'm using multiple combinaisons of params of Capabilities but no success. I'm using custom environment offers by default (the standard environment not working also) I'm using a simple test :

    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(AUTOMATION_NAME, "UIAutomator2");
    driver = new AndroidDriver<>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
    driver.manage().timeouts().implicitlyWait(60, SECONDS);
    driver.get("https://mywebsite.com");

Have you a simple example for testing Appium Web Java JUnit with DesiredCapabilities to include and the custom file yaml that work fine ?

Thank you

已提問 1 年前檢視次數 310 次
1 個回答
0

Hello,

This is Tom from AWS Support.

I see that we would like to use Appium Junit with Appium Desired Capabilities.

Device Farm supports the use of Desired Capabilities through custom test environments setup. Please note that, according to Device Farm documentation shown here [1], Appium capabilities must be a shell-escaped, quoted JSON structure.

For more information about setting up custom test environment and sample YAML specifications, please refer to this page [2]. Please note that the example shown here is for TestNG suite, but the syntax shall be similar to JUnit test.

This guide [3] shows step-by-step guide in how to create and build Appium test for Device Farm. For sample code solutions, here are the GitHub repository for both Android [4] and iOS [5].

I hope the above resources are helpful for developing Appium test. Have a nice day.

Links and References

[1] https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environments-extending.html#w12aac28c19b7

[2] https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environments.html#custom-test-environment-example

[3] https://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-appium.html

[4] https://github.com/aws-samples/aws-device-farm-sample-app-for-android

[5] https://github.com/aws-samples/aws-device-farm-sample-app-for-ios

AWS
支援工程師
Tom_T
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南