I am using Appium 1.4.8 for iOS . I have build the code in simulator using xcode and successfully able to launch the server as well as Appium Inspector. But while running my
If on appium app then select Override Existing Sessions
checkbox under Settings -
This happens because the previous session wasn't shutdown properly and it happens when there is exception thrown in your test. Restart the appium server and try it , it should resolve the issue.
Alternatively if you starting appium as node process, you can give option '--session-override true'
and this would avoid this problem
Adding the deviceName in the capabilities helped. In the appium logs I could figure out the missing thing.
The following is working for me. I am testing by connecting Android device. Please make changes as per your need and apply, this should work now.
DesiredCapabilities capabilities = new DesiredCapabilities().android();
capabilities.setCapability("no",true);
capabilities.setCapability("newCommandTimeout", 100000);
capabilities.setCapability("noReset", true);
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability(CapabilityType.VERSION, "4.4.2");
capabilities.setCapability("deviceName", "Galaxy nexus");
capabilities.setCapability("app", application.getAbsolutePath());
capabilities.setCapability("automationName", "selendroid");
capabilities.setCapability("noRest", true);
driver = new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);