# galen-visual

> This project enable you to integrate Galen visual validation into your Selenium javascript tests

Latest version **0.0.9** (published 2018-07-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install galen-visual
pnpm add galen-visual
yarn add galen-visual
bun add galen-visual
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2018-07-18 |
| First published | 2018-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6.10.0 |
| Dependencies | 2 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Experitest |
| Maintainers | guyarieli |
| Keywords | npm, version |

## Links

- npm: https://www.npmjs.com/package/galen-visual
- Repository: https://github.com/ExperitestOfficial/visual.js
- Issues: https://github.com/ExperitestOfficial/visual.js/issues
- npm.io page: https://npm.io/package/galen-visual

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.87.0
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.2

## Recent versions

- 0.0.9 (latest) — 2018-07-18
- 0.0.7 — 2018-07-10
- 0.0.6 — 2018-07-10
- 0.0.5 — 2018-07-10
- 0.0.4 — 2018-07-10
- 0.0.3 — 2018-07-10
- 0.0.2 — 2018-07-09
- 0.0.1 — 2018-07-09

## README

# galen-visual execute visual validation using Galen in Selenium

This utility will enable you to integrate Galen visual tests into your selenium-webdriver or webdriverio tests.

To easily create your Galen tests use the following chrome extension:

[Chrome Extension](https://chrome.google.com/webstore/detail/visual-testing/bafkdgjddgkhdikjcelcfjhhjkepdgjl)

![Design a spec](https://github.com/ExperitestOfficial/visual.js/blob/master/screenshots/design.png "Design Screen")


It support both of the common node javacript selenium packages: selenium-webdriver and webdriverio.

To integrate into your tests first you need to create a page:

![Create a page](https://github.com/ExperitestOfficial/visual.js/blob/master/screenshots/execution.png "Design Screen")

To install:
```
npm install galen-visual
```

In short:
```
var visual = require('visual.js');
visual.init('K5pAdMqrNz7Lcz69jnB6WE8');
visual.verify(driver, 'login_page');
```



Full selenium example:
```
import {assert} from 'chai';
var webdriver = require('selenium-webdriver');
var visual = require('galen-visual');

const chrome = require('selenium-webdriver/chrome');

describe('visual tests', function(this: any) {
  this.timeout(20000);
  var driver: any;
  before(() => {
    visual.init('K5pAdMqrNz7Lcz69jnB6WE8');
    
  });

  it('#verify', async () => {
    driver = await new webdriver.Builder().usingServer().withCapabilities({'browserName': 'chrome' }).build();
    await driver.get("https://github.com/login");
    setDebug(true);
    const res  = await visual.verify(driver, 'login');
    assert.isTrue(res , 'all is good');
    console.log(getLastResultUrl());
  });
  
});
```



**Note**: Node 6.10 or higher runtime required.

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