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

please-test

v1.0.3

Published

Shorthand helper for @playwright/test — expressive locators, readable error messages

Readme

please-test

Shorthand helper untuk @playwright/test — locator ekspresif dan pesan error yang deskriptif.

page datang dari fixture @playwright/test, please-test hanya menyediakan shorthand di atasnya.


Instalasi

Pastikan Node.js >= 14 sudah terinstall.

npm install please-test @playwright/test && npx playwright install
const { test } = require('@playwright/test')
const { createApp } = require('../app')


test('login berhasil', async ({ page }) => {
    const { please } = createApp(page, test)
    await please.goto('https://myapp.com/login')
    await please.fill('input username', '#username', 'student')
    await please.fill('input password', '#password', 'Password123')
    await please.click('button submit', '#submit')
    await please.verifyPage('https://myapp.com/dashboard')
    await please.see('teks sukses', 'h1', 'Logged In Successfully')
    await please.click('button logout', 'text=Log out')
})

API

please adalah instance dari new Please(page).

Navigasi

| Method | Deskripsi | |---|---| | goto(url, title?) | Navigasi ke URL; jika title diberikan, validasi title halaman | | verifyPage(url, title?) | Verifikasi URL dan/atau title halaman saat ini | | url() | Ambil URL halaman saat ini | | title() | Ambil title halaman saat ini |

Interaksi

| Method | Deskripsi | |---|---| | click(label, selector, time?) | Klik elemen; time (ms) menunda klik setelah jeda | | fill(label, selector, value) | Isi input field | | fillAndEnter(label, selector, value) | Isi input dan tekan Enter | | clear(label, selector) | Kosongkan input field | | scrollTo(label, selector) | Scroll ke elemen | | uploadFile(label, selector, path) | Upload file via input[type=file] | | datepicker(label, selector, value) | Isi input datepicker |

Baca & Assert

| Method | Deskripsi | |---|---| | see(label, selector, expected?, time?) | Baca konten elemen. Jika expected diberikan, throw jika tidak cocok — tetap mengembalikan nilai aktual |

see otomatis membaca value untuk input/textarea/select, dan innerText untuk elemen lain.

Tunggu

| Method | Deskripsi | |---|---| | untilShow(label, selector, time?) | Tunggu elemen muncul (default 20 detik) | | wait(ms?) | Jeda eksplisit (default 2000ms) |

Screenshot

| Method | Deskripsi | |---|---| | screenshot(label?) | Simpan screenshot ke screenshots/label_datetime.png |


Selector

Semua method yang menerima selector otomatis mendeteksi tipe locator:

| Format | Contoh | |---|---| | #id | #username | | text= | text=Klik di sini | | role= | role=button[name=Submit] | | label= | label=Email | | role=Name (shorthand) | button=Login, link=Masuk, checkbox=Setuju | | CSS selector | .btn-primary, [data-id="x"] | | XPath | //button[@type="submit"] | | Tag HTML | h1, textarea |

Shorthand role=Name didukung untuk semua ARIA role yang valid di Playwright: button=Login, link=Masuk, checkbox=Setuju, textbox=Email, combobox=Negara, dst.


Lisensi

MIT