npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

xl_pup

v1.0.3

Published

基于 puppeteer UI 自动化测试工具

Readme

xl_pup

基于 puppeteer UI 自动化测试工具

安装

使用

require('babel-register')  // 需要加babel,不然不能用es6模块功能
import pup, {del, input, click, check, enter, focus, log} from 'xl_pup'
import {setReq, setRes, proxy, setExpose} from 'xl_pup'

// 初始化页面
    await pup('http://127.0.0.1:8088/#/index/home', {
        beforeProxy: (param) => {  // 请求代理,
            const {postData} = param
            return {
                url: postData.method
            }
        },
        exposes: 'puppeteerNative' // 页面注入一个函数,用户拦截
    })
    
   // 该工具以xpath形式获取节点元素
   // 点击元素 
   await click('//*[@id="app"]/div/div/div/div/div[1]/div/div[2]/div/div/div[1]/div[2]/div[1]/div/div/div/div/span')
   // 输入input文本
   await input('//*[@id="app"]/div/div/div/div/div/div[2]/div/div[1]/div/form/input', '8545896554')

方法

default(url,option) : 初始化,创建要给页面,用于测试

del(path,count):删除input内文本

input(path,text):输入input内文本

click(path):点击某一元素

check(path,text):检查元素内文本

enter(path,text):向input继续输入文本

log(msg):打印流程

focus(path):获取焦点

setReq():设置请求拦截

proxy():设置请求代理

setExpose():设置 exposes 中数据

想要了解更多可以去githug上面自行浏览
github 有问题可以在github留言