Hey @yeruva7
Ok sure follow these steps:
1) You need 2 appium running with each different ports
baseUrl_1 = "http://appiumAddress:4726/wd/hub"
baseUrl_2 = "http:/appiumAddress:4725/wd/hub"
2) You need to 2 different instances of android emulator. What I was doing before was running 2 emulators with same instances. So make sure you just run different emulators (what i mean it can be the same version everything but the 2nd one change the name). Apparently appium was getting confuse if i run it with the same.
3) You need to set the capabilities for each emulator:
caps1 = {
platformName:"ANDROID",
platformVersion: "4.4",
deviceName: "emulator-5554",
app: "app1Path.apk",
browserName: "",
}
caps2 = {
platformName:"ANDROID",
platformVersion: "4.4",
deviceName: "emulator-5556",
app: "app2Path.apk",
browserName: ""
}
4) So what i did was to write session for each app in a try catch separately
Then when you run your test 1 app is going to display on 1 emulator and the 2nd app with the 2nd emulator. That's it everything else depends on your script or whatever environment you are using. I am using selenium webdriver with javascript. I hope this helps