(org.jbehave.core.failures.BeforeOrAfterFailed: webdriver selenium错误解决。

(org.jbehave.core.failures.BeforeOrAfterFailed: Method initWebDriver (annotated with @BeforeStory in class com.infomorrow.story.CommonStep) failed: org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.35.0', revision: '8df0c6bedf70ff9f22c647788f9fe9c8d22210e2', time: '2013-08-17 12:46:41'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_15'
Driver info: driver.version: RemoteWebDriver)

 

原来是由于,selenium-server-standalone-2.37.0.jar没有开,开启命令为:

java -jar selenium-server-standalone-2.37.0.jar

  

下面的是windows下的bat命令,把地址更换一下就好

java -Dwebdriver.ie.driver=D:/develop/1022webtest/IEDriverServer.exe -jar D:/develop/1022webtest/selenium-server-standalone-2.37.0.jar -mode hub

  

你可能感兴趣的:(webdriver)