How do I open messaging app when test case is running for any other app.
Need to fetch OTP from messaging app during a test case is running for my android app.
I have tried to create new instance
RemoteWebDriver for Appium server with messaging app capabilities.
//Confirm OTP Submission driver.findElement(By.id("btnConfirm")).click();
//Open messaging app to fetch OTP. DesiredCapabilities cap = new DesiredCapabilities(); cap.setCapability("appPackage", "com.android.mms"); cap.setCapability("appActivity", "com.android.mms.ui.ConversationList"); driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), cap);
But, above code is not working and got error -
A new session could not be created. (Original error: Requested a new session but one was in progress)
I am using testNG, Appium, Eclipse on Windows7.