I'll take you through the steps to get Selenium Grid - Firefox debug hub Docker image up and running on Windows and to VNC to debug it.
- Lets get Selenium grid up and running by updating our docker-compose file
- $ cd compose
- $ nano docker-compose.yml
- copy and paste
hub: image: selenium/hub ports: - "4444:4444" ffdebug: image: selenium/node-firefox-debug ports: - 5900 links: - hub - Save
- Run: $docker rm -f $(docker ps -a -q) //this removes previous containers
- Run: $ docker-compose up
- Wait for the image to download and wait about 10 seconds.
- Run docker ps //we will look for the VNC port
- The highlighted number is your VNC port number.
- Download any VNC client. I'm using RealVNC - https://www.realvnc.com/download/viewer/
- Start and connect the VNC Viewer with your host and port. Password is: secret
- You will see an VNC terminal
- Run the testNG test again. Make sure that (line 26) code is: DesiredCapabilities.firefox()
- You will now see the browser interaction and can develop as you would on your desktop.
That's all there is to it!