Firefox浏览器不会与selenium网格中的其他浏览器并行启动

时间:2015-06-03 10:44:19

标签: java firefox automated-tests selenium-grid

所需的能力:

threadDriver = new ThreadLocal<RemoteWebDriver>();
        String nodeURL = "http://localhost:5566/wd/hub";
        DesiredCapabilities capability = DesiredCapabilities.firefox();
        capability.setBrowserName("firefox");
        capability.setPlatform(Platform.WINDOWS);
        //Map<String, Object> firfoxOptions = new HashMap<String, Object>();
        capability.setCapability("firefox_binary", "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
        //capability.setCapability(f, value);
        threadDriver.set(new RemoteWebDriver(new URL(nodeURL), capability));
        driver = threadDriver.get();
        return driver;

节点命令

java -jar selenium-server-standalone-2.45.0.jar -role node -hub http://localhost:4444/grid/register -port 5566  -Dwebdriver.chrome.driver=Path\chromedriver.exe -Dwebdriver.ie.driver=Path\IEDriverServer.exe

我创建了3个类(每个类有1个方法)并尝试在不同的浏览器中启动3个方法。 Chrome和IE同时推出,但是Chrome和IE完成执行后,Firefox正在推出。

0 个答案:

没有答案
相关问题