I get the next error when I try to run my selenide tests againt selenoid. Could you please help to understand what goes wrong?
Caused by: java.lang.IllegalArgumentException: Illegal key values seen in w3c capabilities: [enableVNC]
Here is my docker compose:
version: '3.8'
services:
selenoid:
image: aerokube/selenoid:latest-release
container_name: selenoid
network_mode: bridge
ports:
- "4444:4444"
volumes:
- ".:/etc/selenoid"
- "/var/run/docker.sock:/var/run/docker.sock"
command: ["-limit=4", "-capture-driver-logs", "-max-timeout=0h5m0s"]
selenoid-ui:
image: aerokube/selenoid-ui:latest-release
container_name: selenoid-ui
network_mode: bridge
ports:
- "8080:8080"
links:
- selenoid
depends_on:
- selenoid
command: [ "--selenoid-uri", "http://selenoid:4444" ]
chrome113:
image: selenoid/vnc_chrome:113.0
And here is my code to determine browser:
import static com.codeborne.selenide.Configuration.*;
browser = CHROME;
browserVersion = "113.0";
browserSize = "1920x1080";
capabilities.setCapability("enableVNC", true);
browserCapabilities = capabilities;
selenide.remote=http://localhost:4444/wd/hub
Help please to understand what can be wrong. Thank you in advance.
RESOLVED:
ChromeOptions options = new ChromeOptions();
options.setCapability("browserVersion", "113.0");
options.setCapability("selenoid:options", new HashMap<String, Object>() {{
/* How to add test badge */
put("name", scenario.getName());
/* How to set session timeout */
put("enableVideo", true);
put("enableVNC", true);
put("videoName", scenario.getName());
}});
browserCapabilities = options;