PHPackages                             andiwijaya/dusk-secure - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. andiwijaya/dusk-secure

ActiveLibrary[Testing &amp; Quality](/categories/testing)

andiwijaya/dusk-secure
======================

A more secure Laravel Dusk that provides simple end-to-end testing and browser automation without exposing routes or authentication.

1.0(5y ago)010MITPHPPHP &gt;=7.1.0

Since Sep 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/andyv4/dusk)[ Packagist](https://packagist.org/packages/andiwijaya/dusk-secure)[ RSS](/packages/andiwijaya-dusk-secure/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

[![](https://camo.githubusercontent.com/697dc62203b022b30cbeba17df9473f514c5825473e4e66887316cdb834dd31a/687474703a2f2f692e696d6775722e636f6d2f376871695659702e706e67)](https://camo.githubusercontent.com/697dc62203b022b30cbeba17df9473f514c5825473e4e66887316cdb834dd31a/687474703a2f2f692e696d6775722e636f6d2f376871695659702e706e67)

[![Total Downloads](https://camo.githubusercontent.com/d1249e0183c849abc1dc4ae62897b7b4d85ccb3c565b2662b61a16dc816bc4d7/68747470733a2f2f706f7365722e707567782e6f72672f747261766f6c74726f6e2f6475736b2d7365637572652f642f746f74616c2e737667)](https://packagist.org/packages/travoltron/dusk-secure)[![Latest Stable Version](https://camo.githubusercontent.com/fea72187f8c2dde06d36a75bc7c4d6cf95c1df7b9d3a624245095481bd84a82d/68747470733a2f2f706f7365722e707567782e6f72672f747261766f6c74726f6e2f6475736b2d7365637572652f762f737461626c652e737667)](https://packagist.org/packages/travoltron/dusk-secure)[![License](https://camo.githubusercontent.com/e7b53aa26847602ea70bc36bf76574a668c47801383b5653c668252fedbbb836/68747470733a2f2f706f7365722e707567782e6f72672f747261766f6c74726f6e2f6475736b2d7365637572652f6c6963656e73652e737667)](https://packagist.org/packages/travoltron/dusk-secure)

What?
-----

[](#what)

Laravel Dusk is an incredibly simple to use browser automation and testing tool. However, it was made with testing in mind, and as such, was never really meant for the production environment limelight.

Not anymore. I've gone ahead and ripped out all the parts that expose routes, or interact with your users.

Why?
----

[](#why)

So we can scrape the web with an amazingly expressive API in a framework we all know and love! All the methods you know and love -- minus the ones on interacting with or acting as users -- are there. See the official docs below for more details.

Caveats and gotchas
-------------------

[](#caveats-and-gotchas)

When using this tool as a scraper, you're typically limited to making dusk tests, and then triggering them via `php artisan dusk`.

You can automate this process and apply them to a command bus *you can schedule!*

Here's how:

Make your dusk test as you have before. Then, make a new command, making sure to give it a unique signature.

In the handle method, simply new up the class of the test you just created, initialize it and run it:

```
/**
 * Execute the console command.
 *
 * @return mixed
 */
public function handle()
{
    $event = new \Tests\Browser\Test;
    $event->prepare();
    $event->testExample();
}
```

Do whatever you had planned with the data you're scraping *inside the test itself* and you're golden.

When you make a test for dusk, make sure you include `$browser->quit();` to ensure that the browser cleans up after itself. Do this after you've processed the data you've scraped.

What's next?
------------

[](#whats-next)

I'll make a `2.0` branch in the coming days to keep pace with the official package. It brings headless operation which will really help with some serious scraping.

Just kidding! Version 1.1.0 upgrades the binary and allows for headless operation.

To run your scraping headless, check out `DuskTestCase.php`, make sure to add ChromeOptions to your use statements, and set the `$options` variable and pass it through to the RemoteWebDriver like pictured below.

```
use Facebook\WebDriver\Chrome\ChromeOptions;

/**
 * Create the RemoteWebDriver instance.
 *
 * @return \Facebook\WebDriver\Remote\RemoteWebDriver
 */
protected function driver()
{
    $options = (new ChromeOptions)->addArguments(['--headless']);

    return RemoteWebDriver::create(
        'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
            ChromeOptions::CAPABILITY, $options
        )
    );
}
```

If anyone wants to help kick in a PR.

Official Documentation
----------------------

[](#official-documentation)

Documentation for Dusk can be found on the [Laravel website](https://laravel.com/docs/master/dusk).

License
-------

[](#license)

Dusk-Secure is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

2056d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b2abf4a136b06e2fb3396da05856ac46f69975383b9ebef2ea4aac3d0ecc700?d=identicon)[andiwijaya](/maintainers/andiwijaya)

---

Top Contributors

[![andiwijaya-dev](https://avatars.githubusercontent.com/u/5283461?v=4)](https://github.com/andiwijaya-dev "andiwijaya-dev (2 commits)")

---

Tags

testinglaravelwebdriver

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andiwijaya-dusk-secure/health.svg)

```
[![Health](https://phpackages.com/badges/andiwijaya-dusk-secure/health.svg)](https://phpackages.com/packages/andiwijaya-dusk-secure)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M255](/packages/laravel-dusk)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M224](/packages/laravel-horizon)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M106](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M368](/packages/laravel-zero-framework)

PHPackages © 2026

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