champi-dev / click-dom-el-programmatically

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

https://www.patreon.com/champipatreon

Usage

Basic

copy and paste the clickEl function to the console and use it like this clickEl({ selector: "svg[aria-label='Like']" })

As promise after click

(async () => {
  await clickEl({
    selector: "svg[aria-label='Like']", 
    sleepAfter: 300
  })
  
  await clickEl({
    element: Array.from(document.querySelectorAll('button'))
    .find(el => el.textContent === 'Follow') 
  })
})()

About


Languages

Language:JavaScript 100.0%