0

System Config with below versions -

Mac OS - 10.12 Xcode - 8.0 Appium - 1.5.3

Below is the script which trying to run:-

public class testclass {

    public static AppiumDriver<WebElement> driver;

    public static void main(String[] args) throws MalformedURLException {
        // TODO Auto-generated method stub
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("platformName", "iOS");
        capabilities.setCapability("platformVersion", "8.1");
        capabilities.setCapability("deviceName", "iphone 6" );
        capabilities.setCapability("app", "settings");
        driver = new IOSDriver<WebElement>(new URL ("http://0.0.0.0:4723/wd/hub"), capabilities);
        driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
        driver.close();

    }

}  

Error As Exception -

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{app=settings, platformVersion=8.1, platformName=iOS, deviceName=iphone 6}], required capabilities = Capabilities [{}] Build info: version: 'unknown', revision: '1969d75', time: '2016-10-18 09:43:45 -0700' System info: host: 'INCDSZPC02604.local', ip: '3.209.248.73', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.1', java.version: '1.8.0_112' Driver info: driver.version: IOSDriver at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:69) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:128) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:141) at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:36) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132) at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:82) at MobileDemo.testclass.main(testclass.java:22)

5
  • How do you launch an Appium node? Command and desired capabilities. Commented Nov 24, 2016 at 7:23
  • I run Appium interface and click on Launch button there. Commented Nov 24, 2016 at 7:43
  • But what parameters do you use there? You need to match parameters for specific device and OS!! Commented Nov 24, 2016 at 7:44
  • I use Platform - 8.1, Device iphone 6 but these are unchecked there. Am I need to check it and then launch the server ??? Commented Nov 24, 2016 at 7:52
  • can you check is there any other appium is running background ? Commented Nov 26, 2016 at 18:11

1 Answer 1

0

you can try with changing port number of server to something else like 5555 and updating same in your code

driver = new IOSDriver<WebElement>(new URL ("http://0.0.0.0:5555/wd/hub"), capabilities);
Sign up to request clarification or add additional context in comments.

1 Comment

Hi ,in appium server settings you can change the port.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.