PHPackages                             quadraecom/pest-plugin-selectors - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. quadraecom/pest-plugin-selectors

ActiveLibrary[Framework](/categories/framework)

quadraecom/pest-plugin-selectors
================================

Add CSS selector-based testing capabilities to Pest

v1.5.1(2y ago)11.9k↑50%MITPHPPHP ^7.4 || ^8.0CI failing

Since Jun 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/QuadraEcommerce/pest-plugin-selectors)[ Packagist](https://packagist.org/packages/quadraecom/pest-plugin-selectors)[ GitHub Sponsors](https://github.com/QuadraEcommerce)[ RSS](/packages/quadraecom-pest-plugin-selectors/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (7)Versions (8)Used By (0)

CSS Selector Plugin for Pest
============================

[](#css-selector-plugin-for-pest)

> Add CSS selector-based testing capabilities to Pest

### Install

[](#install)

```
composer require quadraecom/pest-plugin-selectors --dev
```

### Usage

[](#usage)

This package adds these methods:

```
getSelectorMatches(string $selector): DOMNodeList
```

This package adds these assertions:

```
assertSelectorExists(string $selector)
assertSelectorNotExists(string $selector)
assertSelectorCount(string $selector, int $count)
assertSelectorContains(string $selector, string $value)
assertSelectorsAllContain(string $selector, string $value)
assertSelectorEquals(string $selector, string $value)
assertSelectorsAllEqual(string $selector, string $value)
assertSelectorNotEquals(string $selector, string $value)
assertSelectorsAllNotEqual(string $selector, string $value)
assertSelectorAttributeExists(string $selector, string $attribute)
assertSelectorAttributeNotExists(string $selector, string $attribute)
assertSelectorAttributeEquals(string $selector, string $attribute, $value)
assertSelectorAttributeNotEquals(string $selector, string $attribute, $value)
```

See [tests/Selectors.php](tests/Selectors.php) for example usage.

---

> If you want to start testing your application with Pest, visit the main **[Pest Repository](https://github.com/pestphp/pest)**.

### Package Author

[](#package-author)

This package was created and is maintained by [Quadra, Inc](https://github.com/QuadraEcommerce).

- Website: **[GoQuadra.com](https://goquadra.com)**
- GitHub: **[QuadraEcommerce](https://github.com/QuadraEcommerce)**

[The test assertions](src/Plugin.php) were inspired by code written by [Liam Hammett (@ImLiam)](https://github.com/ImLiam) that can be found in [this post on his blog](https://liamhammett.com/laravel-testing-css-selector-assertion-macros-D9o0YAQJ). *Thank you, Liam!* 🙌🏻

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Recently: every ~1 days

Total

7

Last Release

1072d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/da651299a33725bf425f53cd7c8092fd585e0e67f0c99ab1e4402a9b559da6b9?d=identicon)[squatto](/maintainers/squatto)

![](https://www.gravatar.com/avatar/2fdc97dc841c232157fad1e555145b43428b2e563fdaa384c0b23ef64fbf7297?d=identicon)[keith-ferney](/maintainers/keith-ferney)

![](https://www.gravatar.com/avatar/5405924c82dc097465a5242296613c8bcd2002d482a3c415f1f48a8600740aef?d=identicon)[quadraecom](/maintainers/quadraecom)

---

Top Contributors

[![squatto](https://avatars.githubusercontent.com/u/748444?v=4)](https://github.com/squatto "squatto (31 commits)")

---

Tags

csslaravelpestphpselectortestingphpplugintestingunitframeworktestpestcssselector

### Embed Badge

![Health badge](/badges/quadraecom-pest-plugin-selectors/health.svg)

```
[![Health](https://phpackages.com/badges/quadraecom-pest-plugin-selectors/health.svg)](https://phpackages.com/packages/quadraecom-pest-plugin-selectors)
```

###  Alternatives

[defstudio/pest-plugin-laravel-expectations

A plugin to add laravel tailored expectations to Pest

98548.9k4](/packages/defstudio-pest-plugin-laravel-expectations)[pestphp/pest-plugin-stressless

Stressless plugin for Pest

67792.6k16](/packages/pestphp-pest-plugin-stressless)[jonpurvis/lawman

A PestPHP Plugin to help with architecture testing SaloonPHP integrations

4027.7k8](/packages/jonpurvis-lawman)[spatie/pest-plugin-route-testing

Make sure all routes in your Laravel app are ok

13753.8k](/packages/spatie-pest-plugin-route-testing)[milroyfraser/pest-plugin-gwt

Given When Then(GWT) Plugin for Pest

10332.1k1](/packages/milroyfraser-pest-plugin-gwt)[ozzie/pest-plugin-nest

Nest Pest PHP tests for better organization and readability

2028.3k](/packages/ozzie-pest-plugin-nest)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
