Selenium Grid не запускает Chrome на другом компьютере

У меня есть эта проблема. компьютер, я запускаю HUB и NODE, а затем запускаю свои тесты, в которых я инициализирую Google Chrome следующим образом:

 Selenium selenium = new DefaultSelenium("localhost", 4444, *googlechrome, "http://www.google.com");
 DesiredCapabilities capabilities = DesiredCapabilities.chrome();
 capabilities.setCapability("chrome.switches", Arrays.asList("--start-maximized"));
 WebDriver  driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capabilities);

На моем компьютере все работает нормально — Chrome запускается и выполняет сценарий.Однако, если мой друг попытается сделать то же самое, она получает эту ошибку:

Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_29'
Driver info: driver.version: RemoteWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:435)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:139)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:94)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:102)
    at com.deutscheboerse.test.PerfTests.<init>(PerfTests.java:52)
    at com.deutscheboerse.test.EUAStressTest.myTest(EUAStressTest.java:37)
    at com.deutscheboerse.test.EUAStressTest.main(EUAStressTest.java:60)
Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 4422; received: 3743
    at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
    at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:197)
    at org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthInputStream.java:105)
    at org.apache.http.conn.BasicManagedEntity.streamClosed(BasicManagedEntity.java:152)
    at org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:237)
    at org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:186)
    at org.apache.http.util.EntityUtils.consume(EntityUtils.java:67)
    at org.openqa.selenium.remote.HttpCommandExecutor$EntityWithEncoding.<init> HttpCommandExecutor.java:399)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:287)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:415)
    ... 6 more

Пока единственная разница, которую я обнаружил, заключается в том, что ее концентратор прослушивает http://10.10.190.134:5555мой прослушивает http://10.131 .7.44:5555но оба могут получить доступ к консоли по одному и тому же IP и порту. Я понятия не имею, что не так. Все приветствуется, спасибо

** РЕДАКТИРОВАТЬ **

Я пытался запустить его на другом компьютере и у меня была такая же ошибка Небольшая отладка показала мне это сообщение:

11:04:01.899 WARN - Exception: The path to the chromedriver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list

Итак, перед настройкой Chrome в Selenium Grid мне нужно сделать это:

System.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, "chromedriver.exe");

Я попытался сделать это и все еще не удалось запустить Chrome... Требуется любая помощь

EDID2 Вот как я точно устанавливаю свойство:

File file = new File("lib/chromedriver.exe");
System.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, file.getAbsolutePath());

Я использую этот подход, потому что мне нужно запустить его на большем количестве компьютеров, а файл JAR может находиться в разных местах.

Кстати, предупреждение находится в окне с Selenium Grid в узле роли. Я думаю, если есть какой-либо другой коммутатор.Пока я запускаю эти команды:

java -jar lib//selenium-server-standalone-2.20.0.jar -role hub
java -jar lib/selenium-server-standalone-2.20.0.jar -role node  -hub http://localhost:4444/grid/register -maxSession 12

and then my JAR. The exception is in window with the NODE. Is there any switcher?
5
задан Pavel Janicek 4 April 2012 в 13:42
поделиться