6.1.0 • Published 1 month ago

@zthun/cirque-du-selenium v6.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Circus of Selenium

This is the framework specific circus package for using Selenium's web driver for end to end testing.

Installation

# NPM
npm install @zthun/cirque @zthun/cirque-du-selenium
# Yarn
yarn add @zthun/cirque @zthun/cirque-du-selenium

Browsers

The setup implementations for selenium is the basic choice of what browser you want to support. You have a couple of options. Currently, only Firefox, Chrome, and Edge are supported.

Safari can work, but there have been some bugs discovered which render it currently incompatible for the time being. We will NEVER support Internet Explorer as that browser needs to just fade away for good.

import { Given, After } from '@cucumber/cucumber';

const URL = 'http://localhost:8459';

Given('I open chrome', async function (this: World<any>) {
  this.parameters.driver = await new ZCircusSetupChrome(URL).setup();
});

Given('I open firefox', async function (this: World<any>) {
  this.parameters.driver = await new ZCircusSetupFirefox(URL).setup();
});

Given('I open edge', async function (this: World<any>) {
  this.parameters.driver = await new ZCircusSetupEdge(URL).setup();
});

Given('My page loads', async function (this: World<any>) {
  const { driver } = this.parameters;
  this.parameters.page = ZCircusBy.first(driver, MyPageComponentModel);
});

After(async function (this: World<any>) {
  const { driver } = this.parameters;
  await driver?.destroy();
});
6.1.0

1 month ago

6.0.1

2 months ago

6.0.0

2 months ago

5.0.3

5 months ago

5.0.1

5 months ago

4.3.2

6 months ago

4.3.1

10 months ago

5.0.0

5 months ago

4.3.0

1 year ago

4.2.0

1 year ago

4.1.0

1 year ago