2016-11-24 5 views
0

システムコンフィグを使用してiOSのスクリプトを実行中に以下SessionNotCreatedException以下のバージョンでAppium

1.5.3を実行しようとしているスクリプトは次のとおりです。 -

例外として
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(); 

    } 

} 

エラー -

Exceptiスレッド "メイン"で org.openqa.selenium.SessionNotCreatedException:新しい リモートセッションを作成できません。必要な能力=能力[能力] {0} {0} {0} {0} {0} {0} {0} {0} {0} {0} {0} {0} {0} {0} {0} {0} {0} {0} 、時刻: '2016-10-18 09:43:45 -0700'システム情報: ホスト: 'INCDSZPC02604.local'、ip: '3.209.248.73'、os.name: 'Mac OS X'、 os。 "x86_64"、os.version:'10 .12.1 '、java.version:' 1.8.0_112 ' ドライバ情報: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.Appi io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)でumCommandExecutor.execute(AppiumCommandExecutor.java:69) でorg.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1) org.openqa.selenium.remote.RemoteWebDriver。 org.openqa.selenium.remote.RemoteWebDriverでのstartSession(RemoteWebDriver.java:241) でorg.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:128) 。(RemoteWebDriver.java:141) で io.appium.java_client.DefaultGenericMobileDriver。(DefaultGenericMobileDriver.java:36) io.appium.java_client.AppiumDriverた。(AppiumDriver.java:114)io.appium.java_client.AppiumDriverで 。(AppiumDriver.java:132) io.appium.java_client.ios.IOSDriverで 。(IOSDriver.java:82) MobileDemo.testclass.main(testclass.java:22)

+0

Appiuをmノード?コマンドと必要な機能。 –

+0

私はAppiumインターフェイスを実行し、そこでLaunchボタンをクリックします。 –

+0

しかし、あなたはそこでどのようなパラメータを使用していますか?特定のデバイスとOSのパラメータを一致させる必要があります。 –

答えて

0

であなたが何かにサーバーのポート番号を変更して試すことができますelse 5555 のように、コード内で同じものを更新する

driver = new IOSDriver<WebElement>(new URL ("http://0.0.0.0:5555/wd/hub"), capabilities); 
+0

Appiumはポートのデフォルト4723を取ります...どうすれば他のポートに変更できますか? –

+0

こんにちは、appiumサーバーの設定では、ポートを変更することができます。 –

関連する問題