Selenium/Node.js

This tutorial will assume that you are running tests from your machine, targeting beta cluster. More details about the stack are available at Selenium/Node.js stack page.

Examples will:


 * open browser
 * go to main page
 * check that Log in link is present
 * close browser

The stack:

Stack
In addition to the default stack, this example additionally uses:

Advantages

 * Simple stack with assertions and testing framework (setup, teardown, reporting...).

Disadvantages

 * Another tool to learn (testing framework).

Code
Code from this page is available at mediawiki-selenium-nodejs repository. selenium-mediawiki-mocha repository has more code examples.

Save the code in file (for example ) and run it.

Output
Everything is fine.

There is a problem.

Stack
In addition to the default stack, this example additionally uses:

Advantages

 * Simple stack with assertions, testing framework (setup, teardown, reporting...)
 * Nicer API on top of Selenium

Disadvantages

 * A couple of new tools to learn tool to learn, Mocha and WebdriverIO

Code
Code from this page is available at mediawiki-selenium-nodejs repository. mediawiki-webdriverio repository has more code examples.

Save the code in file (for example ) and run it.

Output
Everything is fine.

There is a problem.

Stack
In addition to the default stack, this example additionally uses:

Advantages

 * Simple stack with assertions, testing framework (setup, teardown, reporting...)
 * Nicer API on top of Selenium

Disadvantages

 * A couple of new tools to learn tool to learn, Mocha and Nightwatch.js

Code
Code from this page is available at mediawiki-selenium-nodejs repository. mediawiki-nightwatch repository has more code examples.

Save the code in file (for example ) and run it.

Output
Everything is fine.

There is a problem.