I’m trying to prepare a test automation framework targeting NodeJS that is intended for developers familiar with JS but not (necessarily) Java. Selenium is at the core of the solution because all the applications under test are web-based.
Any working solution using Selenium, for me, must meet the following needs, either built into the framework or something I write manually:
- Automatic download of the appropriate Selenium driver binary (e.g., if it can’t be found in PATH already).
- Provides the path of the downloaded driver binary to Selenium (in Java this is done via a system property; other Selenium libraries do it differently)
- In the case of running locally, will automatically either find an installed browser on the system, or download one according to the type of WebDriver instance requested (example: request ChromeDriver, framework must download Chrome if it isn’t already installed)
- Provides the path of the web browser to the driver
- In the case of running against a grid or locally, support headless mode easily (in the case of Chrome this basically means you have to be able to supply a command line argument to the web browser command line)
I am very happy with the features of the Java-based Selenium-Jupiter because it meets these needs. It even goes above and beyond by putting the browser in a Docker container, which is quite nice for CI/CD using e.g. Jenkins.
Ideally, all of the above features would be available on Win64 platform (interactive and non-interactive, meaning either a user is at the keyboard of a laptop/desktop or it’s a headless box in the cloud) as well as the Linux64 platform without an X server (so, headless Linux box e.g. a Jenkins build agent).