Skip to content

amarbir22/nodejs-chrome-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

nodejs-chrome-java

Docker image for running protractor tests or any Selenium based tests. Docker Repo

Sample Protractor Config

    SELENIUM_PROMISE_MANAGER: false,
    directConnect: true,

    baseUrl: BASE_URL,

    capabilities: {
        browserName: "chrome",

        chromeOptions: {
            args: [ "--headless", "--no-sandbox"]
        }
    }

Running Test

  • Create a npm script to run your tests in package.json
  • Either install dependencies or create a pretest script
  • Note: As the volume is being attached to the image. Make sure the node modules are linux compatible.
docker run --rm -v $(pwd):/vol -w /vol amarbir22/nodejs-chrome-java /bin/bash -c 'npm run test'

Expandability

As node and Java is pre-installed, You can run tests based on various frameworks such as Webdriver.IO, NightwatchJS etc. Install Selenium Server etc.

Thanks

Special thanks to Jessie Frazelle for her great work on Containerization.

Releases

No releases published

Packages

No packages published