如果我使用setVersion命令,无法在selenium网格节点中打开任何浏览器?

时间:2017-08-21 17:18:40

标签: selenium grid webdriver

一切都很好 但是当我添加行

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}]

我不知道为什么这条线会造成问题? 请告诉我这件事..

0 个答案:

没有答案
相关问题