1.3.0 • Published 6 years ago

navalia v1.3.0

Weekly downloads
142
License
LGPL-3.0
Repository
github
Last release
6 years ago

npm version Build Status dependencies Status styled with prettier

The bullet-proof, fast, and most feature-rich Chrome driver around. Navalia lets you interact with Chrome and run parallel work with ease. Not using JavaScript? There's a GraphQL server that you can use to communicate with over HTTP allowing any runtime to drive Chrome.

Features

  • Scrape webpage data, even from JavaScript-heavy sites.
  • Run automated functional tests.
  • Discover visual regressions in your site.
  • Capture screenshots, pdfs, execute javascript, insert text, and more.
  • The largest API for interacting with Chrome.

GraphQL Front-end

Simply run navalia with a specified port e.g.

$ npm i -g navalia
$ navalia --port 4000

NavaliaQL

Recipes

Usage

The API for interacting with a browser is simple and chainable. You can call all methods individually and await/then the resulting value, or chain multiple together and collect their responses in a single result.

Chaining

const { Chrome } = require('navalia');
const chrome = new Chrome();

chrome
  .goto('https://amazon.com')
  .type('input', 'Kindle')
  .click('.buy-now')
  .end()
  .then((responses) => {
    console.log(responses); // ['https://www.amazon.com/', true, true, true]
  });

Await

import { Chrome } from 'navalia';
const chrome = new Chrome();

async function buyItOnAmazon() {
  const url = await chrome.goto('https://amazon.com');
  const typed = await chrome.type('input', 'Kindle');
  const clicked = await chrome.click('.buy-now');

  chrome.done();

  console.log(url, typed, clicked); // 'https://www.amazon.com/', true, true
}

buyItOnAmazon();

Roadmap

In no particular order, this is the vision of navalia going forward:

  • Expanded browser API (pdf rendering, network watching, more).
  • Bring more vendors onto the framework.
  • Better typings around externals with no @type support.
  • Parameterization on killing long-running jobs.
  • Unit testing all features.
  • Integration testing with the various vendors so our API's don't break when theirs do.
  • Travis, coveralls, greenkeeper, and other handy-dandy tools to automate chore tasks.
1.3.0

6 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.2.3-1

7 years ago

0.2.3-0

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago