npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

selenium-webdriver-runner

v0.1.2

Published

Selenium webdriverjs Runner with example

Downloads

13

Readme

Selenium Webdriver Runner

Build Status Build Status

Sauce Test Status

What is this

This is a demo on how to setup selenium tests with the official selenium-webdriver library from scratch. The package also provide an nodejs executable runner for those who just want to try it out. This example includes the following:

  • A Todo app as the application to test for (more demo may be added in the future)
  • A config file to define your tests properties
  • A test runner which runs your test against the config file
  • Running test in parallel, locally and remotely (with saucelabs)
  • page object setup for the examples
  • A set of mixins that extends the test runner and webdriver features, allow you to run visual regression tests by screenshots, using mocha to write tests, pipe driver instructions, connect with saucelabs, generate coverage report, etc.

Why I am creating this

There are many examples about how to write a few lines of code to get selenium webdriverjs working. Usually they show you how to get the code, create a driver, go to some website and grab the title to prove it works. However, in real applications we want to have something more organized and scalable, that's when the selenium based test frameworks come to help.

Despite the good parts, the problem with using these frameworks, say webdriverio or nightwatch, is they can be too complicated or overkill for a specific projects. They also have a lot dependencies that may not be well maintained, which could cause unstable test outcomes. More and more people went from using the test frameworks, to finally built one that best fit their requirements.

I want to show you it's actually not that hard to create a test runner that works well, with just a few dependencies besides selenium-webdriver, and highly customizable to fit your own needs.

How to use

For fork and customize the code, checkout the test.default.config.js for more details on available configurations. In the todo app, you can create your own test.config.js to overwrite the default one.

For direct download and use the test runner, simply run

npm install selenium-webdriver-runner

And you will be able to run the test by

selenium-webdriver-runner --config [your config file path]

Todo list

  • Documentation