Adapter for Jasmine-to-WebDriverJS. Used by Protractor.
Important: There are two active branches of jasminewd.
- jasminewd1 is an adapter for Jasmine 1.3, and uses the package minijasminenode. It is published to npm as
- jasminewd2 is an adapter for Jasmine 2.x, and uses the package jasmine. It is published to npm as
Automatically makes tests asynchronously wait until the WebDriverJS control flow is empty.
donefunction is passed to the test, waits for both the control flow and until done is called.
If a test returns a promise, waits for both the control flow and the promise to resolve.
expectso that it automatically unwraps promises before performing the assertion.
npm install jasminewd2
In your setup:
var JasmineRunner = ;var jrunner = ;var webdriver = ;globaldriver =;;jrunnerprojectBaseDir = '';jrunner;
In your tests:
For the typings related to the changes in the global jasmine variables (e.g.
it() blocks to return a promise), we publish the package
@types/jasminewd2. If you are writing tests using jasminewd (including
Protractor tests), be sure to include
@types/jasminewd2 in your
devDependencies, as these global type modifications are not bundled with
jasminewd2 npm module.
jasminewd also exports one function directly:
init. Unfortunately, we do not
publish typings for this function. If you call this function directly (e.g. you
are a Protractor dev), you should simply do:
async functions /
async functions and the
await keyword are likely coming in ES2017 (ES8), and
available via several compilers. At the moment, they often break the WebDriver
(GitHub issue). You can
still use them, but if you do then you will have to use
almost all your synchronization. See
spec/asyncAwaitErrorSpec.ts for examples.