Selenoid on Windows 10

Create the browsers.json file

  1. Open Powershell
  2. mkdir selenoid; cd selenoid;
  3. mkdir config; cd config;
  4. notepad browsers.json

{
“firefox”: {
“default”: “58.0”,
“versions”: {
“58.0”: {
“image”: “selenoid/vnc:firefox_58.0”,
“port”: “4444”,
“path”: “/wd/hub”,
“tmpfs”: {“/tmp”:”size=512m”}
}
}
},
“chrome”: {
“default”: “65.0”,
“versions”: {
“65.0”: {
“image”: “selenoid/vnc:chrome_65.0”,
“port”: “4444”,
“tmpfs”: {“/tmp”:”size=512m”},
“shmSize” : 1073741824
}
}
}
}

Save

Start the selenoid grid (In Powershell)

docker run -d `

$current = $PWD -replace "\\", "/" -replace "C", "c";
docker run -d --name selenoid -p 4444:4444 -v //var/run/docker.sock:/var/run/docker.sock -v${current}/config/:/etc/selenoid/:ro aerokube/selenoid:latest-release  

Start the GUI for selenoid grid on localhost:8080

docker run -d –name selenoid-ui –link selenoid -p 8080:8080 aerokube/selenoid-ui –selenoid-uri=http://selenoid:4444

When running your tests set the capabilities as follows to enable VCN (virtual desktop – so that you can watch your tests run live)

//... selenide

Configuration.browser = "firefox";
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setBrowserName("firefox");
capabilities.setVersion("58.0");
capabilities.setCapability("enableVNC", true);
capabilities.setCapability("enableVideo", false);

Configuration.browserCapabilities = capabilities;

Configuration.remote = "http://localhost:4444/wd/hub";

//... Selenide.open("google.com");

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s