How to get Appium platformName inside the test while running on AWS CLOUD

Hi All,

I am trying to run a suite of TestNG test with AWS Device Farm and i want to run the same test with different platform(Android and iOS). So inorder to Setup the Appium capabilities, i need to know what PlatformName is set by AWS device farm while starting an Appium Session.

Is it possible to get the platformName inside my test so that i could make correct setup configurations to run the test?

Best Regards,


Actually i want to setup a capability AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS for Android platform and “autoAcceptAlerts” for iOS platform. So i believe i need to know the platformName before the appium driver is created.

does AWS set ‘PlatformName’ random?

I guess you and only you in test asking to start tests against some device which you know in advance.

In AWS device farm you need to upload the App and based on the app Device farm sets the PlatformName, even if you provide a PlatformName in your test it will override the value, atleast thats what i have experienced.