kermit-pptr
v0.1.0
Published
Kermit is a elegant wrapper for puppeteer with lots of utility.
Downloads
2
Readme
Kermit
Kermit is a elegant wrapper for puppeteer with lots of utility.
Example usage
Kermit has all methods available on the puppeteer Browser and Page object plus more.
Instantiate an instance of Kermit:
// Whatever configuration object you pass in
// will be passed to puppeteer.launch(config);
kermit = await new Kermit({ headless: false })METHODS:
.addMethods():
Kermit allows you to register your own custom methods onto it to make your test suite more verbose
const actions = {
goToGithub() {
return this.goto("https://github.com");
}
};
kermit.addMethods(actions);
await kermit.goToGithub();.getText(selector: string):
Grab the text off of a specific css selector
const text = await kermit.getText('a[rel="nofollow"]');