Skip to content

Latest commit

 

History

History

click-element

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

clickElement(element)

Click on an element

Example

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()

Parameters

Returns

  • promise (Promise)

Details

clickElement performs a single left click on the given element.