Appium Error : A new session could not be created. (Original error: Did not get session redirect from Chromedriver)

前端 未结 5 2028
不知归路
不知归路 2021-02-06 01:59

I am trying to run my first test through Appium and getting the below error.

org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Orig         


        
5条回答
  •  南笙
    南笙 (楼主)
    2021-02-06 02:25

    You need to set the below URL to http://0.0.0.0:9515/wd/hub instead of ****:4723...

    WebDriver driver = new RemoteWebDriver(new URL(http://****:4723/wd/hub), capabilities);

    Chromedriver's port defaults to 9515, not 4723. You should read the documentation on this. There are other capabilities that need to be set correctly (like BROWSER_NAME)

提交回复
热议问题