Single framework for IOS and android appium

Hello all,

Our company app is native one. We are planning to build one framework(Serenity ,Selenium,Java) to work on iOS and android app. Even though it’s native ,functionalities are almost common except few . Could you please suggest is it good idea to have one framework for both app? Also , I wanna run emulator /simulator depends on environment variable as input in code? Could anybody help me how to set that in a class?

Check this question and my answer.

3 Likes

Thanks lot. It’s really helpful. I have a doubt about opening emulator or simulator in a single class depends on input variable. Also, as Appium 2 beta version is introduced is there any different way to open emulator or simulator without desired capabilities?

you can launch and kill them using cli commands
for android use adb command
for iOS use xcrun simctl command

1 Like

Yes You should use same class and same variable to store both ios and Android elements. When u’ll specify the platform for execution it will pick respect locator from the variable reference. for more details go through the POM design pattern for mobile automation you’ll get it.