1.2.1 • Published 3 years ago
zafe v1.2.1
zafe
A helper library to safely operate Selenium automation
How to install
yarn add zafe
How to use
import { Builder } from "selenium-webdriver";
const driver = await new Builder()
.forBrowser("chrome")
.build();
const zafe = new Zafe(driver);
await driver.get(`https://www.example.com`);
await zafe.type(By.xpath(`//input[@name="id"]`), `user001`);
await zafe.click(By.xpath(`//*[contains(text(), "Login")]`));
Initiate Zafe with options
const options = {
shouldLogTraces: true,
shouldCaptureOnSuccess: false,
screenCaptureFolder: "./output/screenshots",
shouldLogTraces: true
}
const zafe = new Zafe(driver, options);