Socket
Book a DemoInstallSign in
Socket

taxi-rank

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

taxi-rank

A JSDom based Selenium Webdriver API

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

taxi-rank

A super fast JSDom based Selenium Webdriver API. Write end to end tests once and run them against this super fast, headless browser built on node.js, then once those tests pass you can run them against real browsers in the cloud!

Build Status Dependency Status NPM version

Installation

npm install taxi-rank -g

Usage

In a separate terminal, run taxi-rank, then you can use cabbie (or your webdriver client of choice), to connect to this super-fast virtual driver:

import assert from 'assert';
import cabbie from 'cabbie-sync';

// connect to taxi-rank, adding {debug: true} makes cabbie log each method call.
const driver = cabbie('taxirank', {debug: true});

try {
  // navigate to a url in the currently active window
  driver.browser.activeWindow.navigateTo('http://example.com');

  // get an element, and check that its text equals some expected value
  assert.equal(
    driver.browser.activeWindow.getElement('h1').getText(),
    'Example Domain',
  );
} finally {
  // whether tests pass or fail, dispose of the driver
  driver.dispose();
}

You can find full API docs for cabbie at https://cabbiejs.org/api/ but you can use any webdriver client by simply telling it to conenct to http://localhost:9516

License

MIT

FAQs

Package last updated on 08 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts