Codeceptjs-Shared
Shared library for the CodeceptJS
![License](https://img.shields.io/npm/l/codeceptjs-shared.svg)
Install
yarn codeceptjs-shared -D
Master Configuration
Simply your existing configuration by Re-Using the Master Configuration.
const master_config = require('codeceptjs-shared').cofing.master;
Follow the example in codecept.conf.js of CodeceptJs-Cucumber E2E Framework.
Shared Helpers
Webdriver Commands Helpers
scrollAndClick
Arguments: locator
Scroll to the locator and click
seeVisible
Arguments: locator
e.g. I.seeVisible(locator)
scrollDownToPixel
Arguments: locator, pixel
Scroll down to defined pixel within the locator, e.g. scroll infinite on page
scrollToElement
Arguments: locator
Scroll down to the element
Custom Methods with I
takeNap
Arguments: seconds
[Optional]
Default: 1 second
Waits for the number of seconds
grabCss
Arguments: string
returns the CSS representation of a locator string.
I.grabCss('.my-class');
returns following,
{
css: '.my-class'
}