Selenoid - Cheat Docs
Selenoid - Cheat Docs
accordingly):
Overview :
Selenoid can be considered as a replacement to selenium grid. It is possible for us to setup selenium grid
in local or in docker using images like selenium/hub and browser images.
I have restricted the scope of this document to cover how to setup solenoid in docker.
browsers.json seems to be heart of selenoid. Selenoid parse this json file and understand the possible
combinations to run the tests. If the user has specified specific capabilities then it will be considered
otherwise the default will be chosen.
If the user have not mentioned some specific capability like browser version, then it will run the test on
the browser version where default is mentioned.
Note: User have to create this document in the local host manually. The images mentioned in this file
will not downloaded from docker-hub automatically. We need to specifically pull the browser ,
android images from dockerhub separately.
In my case I have created the file in the path :
b) $current = $PWD -replace "\\", "/" -replace "C", "c" (to get the current directory location –
only works in powershell) 🡪 Not a mandatory stuff
d) Point your tests to http://localhost:4444/wd/hub/ (If you are setting this in any other
machine – use the machine ip instead of localhost)
f) The above commands may slightly vary for linux or Mac due to file separators(Please
change it accordingly - https://aerokube.com/selenoid/latest/#_video_recording)
h)
i) Selenoid by default will allow 5 parallel sessions. If you want to have more please override
the –limit parameter like,
If you are not sure about the capabilities to be passed, click the capabilities in the localhost:8090
window in the top right corner and choose the language,
Dropdown will list all the values mentioned in the dropdown. You can choose any one value
from dropdown to view exact capability.
5. Viewing Live preview:
We can view the live preview by clicking on the session id. After running your test look for the
session id in the preview window.
6. Accessing the videos:
Videos can be accessed after the test execution with http://localhost:4444/video/
Since I have given specific capability videoName , it has used that for naming the video.
Otherwise the session id will be the video name.
We can also directly access the video with url like http://localhost:4444/video/+filename
Videos will be automatically stored in the mounted folder in the host. In my case it is like this,
or
manually delete in the local host where the videos are stored.
docker logs –follow selenoid 🡪 to follow the logs (While spinning the container you can remove –d to
follow the logs directly)