Tag: selenium grid2

如何在集线器中注册节点后启动远程webdriver?

我正在尝试启动remoteWebdriver,因为我已经逐步创建了一个集线器,然后我在其上添加了一个节点。 这很好。我执行时的问题: Thread.currentThread().join(); 程序停止执行,如果我删除此行,我会收到错误。 try{ String strIP = “localhost”; GridHubConfiguration config = new GridHubConfiguration(); config.setTimeout(30000000); config.setPort(4444); config.setHost(strIP); Hub hub = new Hub(config); hub.start(); RegistrationRequest req = new RegistrationRequest(); req.setRole(GridRole.NODE); Map nodeConfiguration = new HashMap(); nodeConfiguration.put(RegistrationRequest.PROXY_CLASS, DefaultRemoteProxy.class.getName()); nodeConfiguration.put(RegistrationRequest.MAX_SESSION, 5); nodeConfiguration.put(RegistrationRequest.PORT, 5555); nodeConfiguration.put(RegistrationRequest.HOST, 4444); nodeConfiguration.put(RegistrationRequest.AUTO_REGISTER, true); nodeConfiguration.put(RegistrationRequest.REGISTER_CYCLE, 5000); nodeConfiguration.put(RegistrationRequest.HUB_HOST, “localhost”); nodeConfiguration.put(RegistrationRequest.HUB_PORT, 4444); nodeConfiguration.put(“remoteHost”, “http://” + strIP + […]

带有Chrome驱动程序的Selenium网格(WebDriverException:驱动程序可执行文件的路径必须由webdriver.chrome.driver系统属性设置)

我想让我的Selenium Grid在Chrome驱动程序上运行。 起初我开始使用hub和node:java -jar selenium-server-standalone-2.45.0.jar -role hub java -jar selenium-server-standalone-2.45.0.jar -role node -hub http:// localhost: 4444 /网格/寄存器 比我启动我的测试: public class ChromeDriverTest { private WebDriver driver = null; String BaseURL,NodeURL; @Before public void before() throws Exception{ BaseURL=”http://www.google.com”; NodeURL=”http://localhost:4444/wd/hub”; File file = new File(“C:\\Users\\pushkaryova\\Desktop\\Nexus\\driver\\chromedriver.exe”); System.setProperty(“webdriver.chrome.driver”, file.getAbsolutePath()); DesiredCapabilities capa =DesiredCapabilities.chrome(); capa.setBrowserName(“chrome”); capa.setPlatform(Platform.ANY); driver=new RemoteWebDriver(new URL(NodeURL),capa); } @Test public […]