Codeception / Codeception/module-webdriver

Setting custom capabilities for matching specific Nodes

Đang mở
#135 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
39
Fork
25
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

So I am try to set up custom capabilities for matching specific nodes but I keep getting this error:

```
Driver initiation: SessionNotCreatedError: Could not start a new session. Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: exited normally.
(session not created: DevToolsActivePort file doesn't exist)
(The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Host info: host: 'd86e3f5d6ac3', ip: '172.17.0.2'
Build info: version: '4.23.0', revision: '77010cd'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-122-generic', java.version: '17.0.11'
Driver info: driver.version: unknown
Build info: version: '4.23.0', revision: '77010cd'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-122-generic', java.version: '17.0.11'
Driver info: driver.version: unknown
Build info: version: '4.23.0', revision: '77010cd'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.8.0-36-generic', java.version: '17.0.11'
Driver info: driver.version: unknown
at Object.throwDecodedError (/home/omoalfa/Desktop/Omoalfa/Node/cloud-runner/node_modules/selenium-webdriver/lib/error.js:521:15)
at parseHttpResponse (/home/omoalfa/Desktop/Omoalfa/Node/cloud-runner/node_modules/selenium-webdriver/lib/http.js:510:13)
at Executor.execute (/home/omoalfa/Desktop/Omoalfa/Node/cloud-runner/node_modules/selenium-webdriver/lib/http.js:443:28)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
remoteStacktrace: ''
}
```

I am following the instructions [here](https://www.selenium.dev/documentation/grid/configuration/toml_options/#setting-custom-capabilities-for-matching-specific-nodes)
this is how I initiated the browser node using docker:
`docker run -d -p 5555:5555 -e SE_EVENT_BUS_HOST= -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 -e SE_NODE_HOST= -e SE_NODE_STEREOTYPE='{ "browserName":"chrome","browserVersion":"120.0","platformName": "linux", "app:project_id": "9a920fb9-cebe-4ef7-8e2d-9b6fbd78f2cd" }' selenium/node-chrome:120.0`

and then tried creating a session in my code using the following step:

```
const options = new chrome.Options();

options.addArguments('--start-maximized');

options.addArguments('--ignore-certificate-errors');

options.excludeSwitches('enable-logging');
options.setLoggingPrefs({ browser: 'ALL' });
options.setBrowserVersion("120.0")
options.setPlatform("linux")

capabilities = Capabilities.chrome();
capabilities.set("se:name", name);
capabilities.set("app:project_id", "9a920fb9-cebe-4ef7-8e2d-9b6fbd78f2cd")
capabilities.setAcceptInsecureCerts(true);

driver = await new Builder().forBrowser(Browser.CHROME).setChromeOptions(options).withCapabilities(capabilities).usingServer(hubServer).build();
```

Is there a bug somewhere or is there something I am doing wrong?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.