Click on an element
import { openBrowser, openTab, findElement, clickElement } from 'puppet-strings'
async function run() {
const browser = await openBrowser('google-chrome')
const tab = await openTab(browser, 'https://www.npmjs.com/')
const blogLink = await findElement(tab, 'footer a', 'Blog')
await clickElement(blogLink)
}
run()
element
(Element)
promise
(Promise)
clickElement
performs a single left click on the given element
.