一切都很好 但是当我添加行
new DesiredCapabilities().chrome().setVersion("60");
它开始显示错误
代码是这样的 -
public class New {
DesiredCapabilities dc;
WebDriver driver;
String baseURL, hubURL;
@BeforeTest
public void bTest() throws MalformedURLException{
dc = new DesiredCapabilities();
baseURL = "http://google.com";
hubURL = "http://localhost:5555/wd/hub";
// setting the browser
dc.setBrowserName("chrome");
// setting the platform on which we have to run test cases
dc.setPlatform(Platform.WINDOWS);
dc.setVersion("60"); // => it's creating problem
// setting the client on which we have to run the test case
driver = new RemoteWebDriver(new URL(hubURL), dc);
}
}
Error forwarding the new session cannot find : Capabilities [{browserName=chrome, platformName=WINDOWS, version=60, platform=WINDOWS}]
我不知道为什么这条线会造成问题? 请告诉我这件事..