I have configured my automation app to run appium on lambdatest. But I am getting the below error where it is unable to create the driver session
Driver info: io.appium.java_client.android.AndroidDriver
Command: [null, newSession {capabilities=[{browserName=Chrome, appium:deviceName=Google Pixel 7 Pro, platformName=ANDROID, appium:platformVersion=13}], desiredCapabilities=Capabilities {browserName: Chrome, deviceName: Google Pixel 7 Pro, platformName: ANDROID, platformVersion: 13}}]
Capabilities {browserName: Chrome, deviceName: Google Pixel 7 Pro, platformName: ANDROID, platformVersion: 13}
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 400. Message: unsupported platfrom ANDROID
The platform name in my code is Android but it gets converted to all caps internally. I am running the below selenium and appium versions.
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.9.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>8.5.1</version> <!-- Specify the desired version -->
</dependency>
Please let me know if there are any workarounds or any lower versions with which this might execute.
The desired capabilities details had to be passed as a map along with a w3c parameter for this to work. Given below is the code that worked for me.