Skip to content

PavelCodeStorage/selenium-docker-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium with Docker images

Overview:

Repository provide configuration example of Selenium with docker images


What you need to do:

  1. Install docker (https://docs.docker.com/release-notes/docker-ce/#17031-ce-2017-03-27)
  2. Install VNC Viewer (https://www.realvnc.com/en/connect/download/viewer/)
  3. Navigate to the folder where docker-compose.yml file and execute from command line command: docker-compose up
  4. Wait until all necessary images are downloaded :)
  5. From command line execude command: docker ps -a (see created containers)
  6. Open VNC Viewer and add path to your container (VNC allow us to see what happen in our tests) dockerimagesvncexample
  7. Don't forget to add some changes in your code see :
       if (driver == null) {
            DesiredCapabilities capabilities = DesiredCapabilities.firefox();
            capabilities.setBrowserName("firefox");
            capabilities.setPlatform(Platform.LINUX);
            try {
                driver = new RemoteWebDriver(new URL("http://127.0.0.1:4444/wd/hub"), capabilities);
            } catch (MalformedURLException e) {
                e.printStackTrace();
            }
        }
        return driver;
  1. Run out tests : mvn clean test
  2. Even with docker you can make screenshoots and added it in reporting (i.e see: dockerimagesallureresults

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published