Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Libraries

Matti Schneider edited this page Sep 4, 2013 · 3 revisions

Libraries

Promises

Watai uses promises throughout its codebase. The chosen Promises/A implementation is Q, for its proper respect of the spec, and its very large API surface and helper methods.

Communication with WebDriver

The chosen implementation for WebDriver is wd.

wd is the only library out of WebDriverJS, Soda and Selenium-Webdriverjs to support the Alert commands and to offer a Q-based promises API, sharing that library with Watai's core.

Convenience

The standard JS+Node libraries are a bit limited in convenience methods.

To ease development, MooTools is used, mainly for its class system but also for its elegant way of providing helper methods. Yes, it relies on extending core objects' prototypes. Sorry if you don't like that.

CLI

The RunnerCLI uses CLI animation for spinners, for example. That code was mostly taken from Mocha, as attributed.

Libraries such as cli or Celeri could be used instead. However, they are mostly focused on input rather than output, while Watai is not so concerned with user input. Moreover, Celeri's spinner is much uglier than Mocha's ([\] vs ).

Logging

Logging uses winston.

This was a nice idea before views were properly implemented, but now it just feels overkill. Dependency on that library should be minimized, and retired when possible.

Clone this wiki locally