Java Firefox浏览器没有与selenium网格中的其他浏览器并行启动

Java Firefox浏览器没有与selenium网格中的其他浏览器并行启动,java,firefox,automated-tests,selenium-grid,Java,Firefox,Automated Tests,Selenium Grid,所需功能: threadDriver = new ThreadLocal<RemoteWebDriver>(); String nodeURL = "http://localhost:5566/wd/hub"; DesiredCapabilities capability = DesiredCapabilities.firefox(); capability.setBrowserName("firefox"); capa

所需功能:

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;

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

尝试设置“-maxSession”为您的节点将参数设置为3。否。它不起作用。实际上,在每次测试方法之后,我都会关闭浏览器。因此,当所有浏览器都关闭时,只有firefox打开。请复制完整的源代码好吗?也许这会更容易帮助您:)这里的问题很可能是您的节点配置,就像peetya所回避的那样。尝试设置-maxSession和maxInstances。节点可以限制实例的数量以及会话的数量。这里是参考,如果你需要更多信息:尝试为你的节点将“-maxSession”参数设置为3。不..它不工作..实际上在每个测试方法之后,我都会关闭浏览器..所以当所有浏览器都关闭时,只有firefox打开。你能复制完整的源代码吗?也许这会更容易帮助您:)这里的问题很可能是您的节点配置,就像peetya所回避的那样。尝试设置-maxSession和maxInstances。节点可以限制实例的数量以及会话的数量。这里是参考,如果你需要更多信息:尝试为你的节点将“-maxSession”参数设置为3。不..它不工作..实际上在每个测试方法之后,我都会关闭浏览器..所以当所有浏览器都关闭时,只有firefox打开。你能复制完整的源代码吗?也许这会更容易帮助您:)这里的问题很可能是您的节点配置,就像peetya所回避的那样。尝试设置-maxSession和maxInstances。节点可以限制实例的数量以及会话的数量。如果您需要更多信息,请参阅:
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