Giter VIP home page Giter VIP logo

puppeteer-humanize's Introduction

Puppeteer-Humanize

puppeteer-humanize

Humanizer functions for Puppeteer

Install

$ npm install @forad/puppeteer-humanize

Example

Below is an example of the typeInto function.

import { typeInto, TypeIntoConfig } from "@forad/puppeteer-humanize"
import { launch, Browser, Page, ElementHandle } from "puppeteer-extra"


;( async () => {
    const browser: Browser = await launch()
    const page: Page = await browser.newPage()

    await page.goto(`https://foo.bar`)

    const input: ElementHandle | undefined = await page.$(`input#my-input`)

    if (input) {
        // Text to enter into input.
        const text: string = `Zero Cool? Crashed fifteen hundred and seven computers in one day? Biggest crash in history, front page New York Times August 10th, 1988. I thought you was black, man. YO THIS IS ZERO COOL!`
        // Optional action configuration.
        // See `schemas/configs.ts` for full configuration shape.
        const config: TypeIntoConfig = {
            mistakes: {
                chance: 8,
                delay: {
                    min: 50,
                    max: 500
                }
            },
            delays: {
                space: {
                    chance: 70,
                    min: 10,
                    max: 50
                }
            }
        }
        // Deploy the action...
        await typeInto(input, text, config)
    }

    console.log(`Input complete!`)
} )()

Implemented

  • typeInto(element, text, config)

Roadmap

  • GAN Mouse movement actions
  • Improve typing actions
  • Suggest stuff in Discord or Discussions (Not Issue Tracker)

puppeteer-humanize's People

Contributors

prescience-data avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

puppeteer-humanize's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.