wdio-base-testing
v1.0.0
Published
This repository stores a package of [Webdriverio](https://webdriver.io/) utilities or helpers to work with web automated test.
Downloads
1
Readme
Webdriverio Utils
This repository stores a package of Webdriverio utilities or helpers to work with web automated test.
Installation Guide
Prerequisites
- Install latest Git version.
- Install latest Node and NPM version.
Installation
npm i -S @automation/testing
Building
In order to build the project locally, run npm run build
.
How it works
After installing the package, you can start building your page objects.
Example:
import BasePage from "@automation/testing/dist/base.page";
import {withId} from '@automation/testing/dist/bys';
import {clickElement, setValue} from "@automation/testing/dist/actions/real";
export class Anypoint extends BasePage {
public locator(): Promise<WebdriverIO.Element> {
return $(withTestId('someID'));
}
public async loginWith(username: string, password: string): Promise<void> {
await setValue(await $(withId('usernameID')), username);
await setValue(await $(withId('passID')), password);
await clickElement(await $(withId('loginBtnID')));
}