# jasminewd

> WebDriverJS adapter for Jasmine.

Latest version **1.1.0** (published 2014-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install jasminewd
pnpm add jasminewd
yarn add jasminewd
bun add jasminewd
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2014-09-15 |
| First published | 2014-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 46 |
| Author | Julie Ralph |
| Maintainers | juliemr |
| Keywords | test, testing, webdriver, webdriverjs, selenium, jasmine |

## Links

- npm: https://www.npmjs.com/package/jasminewd
- Repository: https://github.com/angular/jasminewd
- Issues: https://github.com/angular/jasminewd/issues
- npm.io page: https://npm.io/package/jasminewd

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2014-09-15
- 1.0.4 — 2014-07-18
- 1.0.3 — 2014-07-02
- 1.0.2 — 2014-07-02
- 1.0.1 — 2014-06-17
- 1.0.0 — 2014-06-03

## README

jasminewd [![Build Status](https://travis-ci.org/angular/jasminewd.png?branch=master)](https://travis-ci.org/angular/jasminewd)
=========

Adapter for Jasmine-to-WebDriverJS. Used by [Protractor](http://www.github.com/angular/protractor).


Features
--------

 - Automatically makes tests asynchronously wait until the WebDriverJS control flow is empty.

 - If a `done` function is passed to the test, waits for both the control flow and until done is called.

 - Enhances `expect` so that it automatically unwraps promises before performing the assertion.

Installation
------------
```
npm install jasminewd
```

Usage
-----

Assumes selenium-webdriver as a peer dependency.

```js
// In your setup.
var minijn = require('minijasminenode');
require('jasminewd');

global.driver = new webdriver.Builder().
    usingServer('http://localhost:4444/wd/hub').
    withCapabilities({browserName: 'chrome'}).
    build();

minijn.executeSpecs(/* ... */);

// In your tests

describe('tests with webdriver', function() {
  it('will wait until webdriver is done', function() {
    // This will be an asynchronous test. It will finish once webdriver has
    // loaded the page, found the element, and gotten its text.
    driver.get('http://www.example.com');

    var myElement = driver.findElement(webdriver.By.id('hello'));

    // Here, expect understands that myElement.getText() is a promise,
    // and resolves it before asserting.
    expect(myElement.getText()).toEqual('hello world');
  });
})
```

---
_Source: https://npm.io/package/jasminewd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
