Demo of using Selenium and Nightwatch to automate a DuckDuckGo search
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitignore
README.md
nightwatch.conf.js
package.json

README.md

Selenium Nightwatch Demo

This demo goes along with the blog post: https://jruddell.com/blog/selenium-nightwatch

Intro

Selenium is an extremeley useful tool for automating end-to-end tests. It uses the W3C WebDriver API to launch an instance of a browser (such as Chrome, Firefox, or Safari), navigate to a web page, then run assertions that verify the page is appearing/functioning as you expect. This demo launches a Selenium (using Nightwatch), navigates to the the DuckDuckGo search engine, makes a simple query, and asserts the results are as expected.

Setup

Clone the project and install the dependencies

git clone https://github.com/ruddell/selenium-nightwatch-demo.git
cd selenium-nightwatch-demo && npm install

Running Tests

To run the tests, simply run the following command. It gets the test script from the package.json file and runs that command. Chrome will launch and run the duck-duck-go.js test.

npm run test