将量角器测试指向硒网格时,出现“ WebDriverError:未知错误:无法找到Chrome二进制文件”

时间:2019-01-16 02:52:30

标签: selenium protractor grid

如果我在本地运行,量角器测试可以正常工作。当我指向硒网格时,出现以下错误。

[chrome #01-1]
[chrome #01-1] C:\Users\User1\Projects\ui-auto.qa\node_modules\selenium-webdriver\lib\error.js:546
[chrome #01-1]         throw new ctor(message);
[chrome #01-1]               ^
[chrome #01-1] WebDriverError: unknown error: cannot find Chrome binary
[chrome #01-1]   (Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.14.77-70.59.amzn1.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
[chrome #01-1] Command duration or timeout: 4 milliseconds
[chrome #01-1] Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
[chrome #01-1] System info: host: 'ip-10-0-39-73', ip: '10.0.39.73', os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.77-70.59.amzn1.x86_64', java.version: '1.8.0_141'
[chrome #01-1] Driver info: driver.version: unknown
[chrome #01-1]     at Object.checkLegacyResponse (C:\Users\User1\Projects\ui-auto.qa\node_modules\selenium-webdriver\lib\error.js:546:15)
[chrome #01-1]     at parseHttpResponse (C:\Users\User1\Projects\ui-auto.qa\node_modules\selenium-webdriver\lib\http.js:509:13)
[chrome #01-1]     at doSend.then.response (C:\Users\User1\Projects\ui-auto.qa\node_modules\selenium-webdriver\lib\http.js:441:30)
[chrome #01-1]     at process._tickCallback (internal/process/next_tick.js:68:7)```

The grid was started like this 
```java -jar ./selenium-server-standalone-3.141.59.jar -role hub```

```java -Dwebdriver.chrome.driver=./grid/chromedriver -jar ./selenium-server-standalone-3.13.0.jar -role node -hub http://10.0.39.73:4444/grid/register/ ```

In the grid I can see ```15:30:45.313 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {server:CONFIG_UUID=114e6ab9-df3e-4501-a55b-eac7882a9253, seleniumProtocol=WebDriver, browserName=chrome, maxInstances=5, platformName=LINUX, platform=LINUX}```

From the grid console, seems everything is fine. Also, the driver has been placed in the same location as the selenium-server-standalone-3.141.59.jar. 

0 个答案:

没有答案