Question

Not able to automate android native inbuilt messaging App

  • 27 May 2022
  • 0 replies
  • 71 views

Badge

Trying to read topmost message in the android real device by opening messaging app witch is inbuilt native app. Getting an error when I try with below mentioned capabilities. Please find error logs also

 

MutableCapabilities caps = new MutableCapabilities();caps.setCapability("platformName", "Android");caps.setCapability("deviceName", "Samsung_Galaxy_S9_free");caps.setCapability("appPackage", "com.samsung.android.messaging");caps.setCapability("appActivity", "com.samsung.android.messaging.ui.view.main.WithActivity");URL url = new URL("Driver creation url");AndroidDriver driver = new AndroidDriver(url, caps);

 

Error logs:

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: errorId: fd8db18f-8562-4f24-b356-bbd77d3612c2 - Unable to allocate device Samsung_Galaxy_S9_free within 900000ms or 3 tries. This can happen if there were no available devices within the time or your plan's max concurrent test run is not corresponding to your usage


Detailed Info: Status Code: 500 - Error while starting appium session: {"value":{"error":"unknown error","message":"An unknown server-side error occurred while processing the command. Original error: The desired should not include both of an 'appPackage' and a 'browserName'","stacktrace":"UnknownError: An unknown server-side error occurred while processing the command. Original error: The desired should not include both of an 'appPackage' and a 'browserName'\n    at getResponseForW3CError (/root/appium/appium/1.22.2/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)\n    at asyncHandler (/root/appium/appium/1.22.2/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)"}}

 

Maven Dependencies:

 

<dependency>    <groupId>org.seleniumhq.selenium</groupId>    <artifactId>selenium-java</artifactId>    <version>4.1.4</version></dependency><!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-android-driver --><!-- https://mvnrepository.com/artifact/io.appium/java-client --><dependency>    <groupId>io.appium</groupId>    <artifactId>java-client</artifactId>    <version>8.0.0</version></dependency>

 

Note: I have not included browserName capability in the MutableCapabilities but still getting ann error like “The desired should not include both of an 'appPackage' and a 'browserName'"


0 replies

Be the first to reply!

Reply