2

I am new to Docker and I am exploring Docker as a way to build a more stable and maintainable Selenium GRID. I have completed the Docker + Selenium Grid course at Udemy, but I still don't know a few things.

My company has a web portal and I am required to verify functionality across browers and OSes:

  • Recent versions of Chrome on recent versions of Mac, Linux & Windows
  • Recent versions of Firefox on recent versions of Mac, Linus & Windows
  • Recent versions of Safari on Mac
  • Recent versions of IE and Edge on recent versions of Windows

As far as I can tell a Docker container is 'linux-like'. Does that mean it serves only to verify Chrome and Firefox on linux. Is there some way to use Docker to verify these other browser + OS combos?

Selena
  • 2,208
  • 8
  • 29
  • 49
  • I recommend looking into Docker for Windows. You should be able to build Linux container and Windows container and run them on a Windows machine. Not sure what the status is for Mac. The following article may be helpful [Run Linux and Windows Containers on Windows 10](https://stefanscherer.github.io/run-linux-and-windows-containers-on-windows-10/) – dey.shin Oct 12 '17 at 18:25
  • I have updated the answer for dockerizing IE/EDGE, based on my findings. Check if that solution works for you. https://stackoverflow.com/a/47865355/5449500 – Akshay barahate Apr 17 '19 at 11:55

1 Answers1

1

Please explore the below projects for selenium grid with docker on Linux and Windows .

1)https://github.com/elgalu/docker-selenium/blob/master/README.md

2)https://github.com/SeleniumHQ/docker-selenium

3)https://github.com/zalando/zalenium/blob/master/docs/usage_examples.md

Recent versions of Safari on Mac -: I am not sure about the safari availability in docker hub , but try putting your question for mac in docker-for-selenium project they will help you .

Recent versions of IE and Edge on recent versions of Windows -:Yes , their are some challenges while implementing the IE and Edge in windows containers.

please check this thread @https://github.com/MicrosoftDocs/Virtualization-Documentation/issues/214

it is clearly mentioned here , "Windows feature enabling to install the GUI within a windows container" ,So challenges are their to enable GUI for windows container .

But still if you want to go for cross browser testing with other options available for windows . you can try exploring this @ https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

UPDATES

Copying my answer from https://stackoverflow.com/a/55704955/5449500

Still there is no official approach to run IE/EDGE inside docker as "No Windows docker images have GUI, so we cannot test IE11, EDGE."

But,We can install virtual-box and make this happen.

This approach adds extra layer of virtualization[Nesting of virtualization] on the top of docker to make the IE/Edge execution happen and I think in near future it may leads to to performance issue for heavy testing.

If Selenium testing is what you are looking for and don't have heavy load , you can give a try to the approach mentioned in the link.

Youtube - Selenium Windows containers in Docker under Linux

Github - Windows Images

Blogpost - selenium-on-windows-docker-revolution

Akshay barahate
  • 649
  • 8
  • 23