0.2.6 • Published 23 days ago

@lifeway/webdriver-testing-library v0.2.6

Weekly downloads
60
License
MIT
Repository
-
Last release
23 days ago

Webdriver Testing Library

Simple and complete custom Selenium Webdriver commands and utilities that encourage good testing practices.

Due to limited bandwidth to maintain a healthy open-source project at this time, this project is being replaced by an internal project: @lifewayit/webdriver-testing-library. See the migration guide for details on moving from this library to the new library.


NPM Shield Downloads Shield

The Problem

Writing tests with Selenium Webdriver can feel very different from other end-to-end test, or unit test, frameworks. The cross-browser flexibily of the WebDriver spec can make using Selenium necessary at times, however the interface can cumbersome and there for lead to unmaintainable tests.

This Solution

The Webdriver Testing Library is a collection of utilites intended combine the browser compatibility of the Selenium Webdriver with the readability of React Testing Libary's interface. Writing tests with this library should feel similiar to writing tests using any other Testing Library, and therefore encourage better testing practices.

Installation

This module is distributed via npm which is bundled node and should be installed as on of your projects devDependencies.

npm install --save-dev @lifeway/webdriver-testing-library

This library has peerDependencies listings for selenium-webdriver.

Examples

Basic Example

import { WebDriver } from 'selenium-webdriver';
import { click, queryByText } from '@lifeway/webdriver-testing-library';

test('Basic Example', async () => {
  const driver = new WebDriver();

  await click(driver)(queryByText('Login'));
});

useScreen Example

import { WebDriver } from 'selenium-webdriver';
import { useScreen } from '@lifeway/webdriver-testing-library';

test('useScreen Example', async () => {
  const driver = new WebDriver();
  const screen = useScreen(driver);

  await screen.click(screen.queryByText('Login'));
});
0.2.6

23 days ago

0.2.5

23 days ago

0.2.4

1 month ago

0.2.3

2 months ago

0.2.1

11 months ago

0.2.0

1 year ago

0.2.2

11 months ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago