1.0.0 • Published 2 years ago

wdio-base-testing v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Webdriverio Utils

This repository stores a package of Webdriverio utilities or helpers to work with web automated test.

Installation Guide

Prerequisites

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')));
    }