PHPackages                             dusk-browser/dusk-browser - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. dusk-browser/dusk-browser

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dusk-browser/dusk-browser
=========================

Laravel Dusk Browser is Laravel Dusk for browsing capabilities only.

148PHP

Since Jan 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/clemblanco/dusk-browser)[ Packagist](https://packagist.org/packages/dusk-browser/dusk-browser)[ RSS](/packages/dusk-browser-dusk-browser/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Dusk Browser - Experimental
===================================

[](#laravel-dusk-browser---experimental)

[![Build Status](https://camo.githubusercontent.com/f3843c4916ffb4743e96ae99ecace98e916dfcb49ca18e218a17fc751101db77/68747470733a2f2f7472617669732d63692e6f72672f636c656d626c616e636f2f6475736b2d62726f777365722e737667)](https://travis-ci.org/clemblanco/dusk-browser)[![Total Downloads](https://camo.githubusercontent.com/b900c5acca851bdeb2d2acf3ce52f2267c83d90e10c59a472f3a2c26322ca2b1/68747470733a2f2f706f7365722e707567782e6f72672f6475736b2d62726f777365722f6475736b2d62726f777365722f642f746f74616c2e737667)](https://packagist.org/packages/dusk-browser/dusk-browser)[![Latest Stable Version](https://camo.githubusercontent.com/3d46dcfdd9789fa41993a459393adc39be4d98816370d0d120195189f00527c2/68747470733a2f2f706f7365722e707567782e6f72672f6475736b2d62726f777365722f6475736b2d62726f777365722f762f737461626c652e737667)](https://packagist.org/packages/dusk-browser/dusk-browser)[![License](https://camo.githubusercontent.com/b7a6ff4e97f7db933a30c1fea5221f670affd10affe0ba4a14aeb2a3f939b81e/68747470733a2f2f706f7365722e707567782e6f72672f6475736b2d62726f777365722f6475736b2d62726f777365722f6c6963656e73652e737667)](https://packagist.org/packages/dusk-browser/dusk-browser)

Introduction
------------

[](#introduction)

Laravel Dusk Browser provides an expressive, easy-to-use browsing API based on [Laravel Dusk 5.0](https://github.com/laravel/dusk/tree/5.0).

This is mainly for people who are only after the browsing capabilities of Laravel Dusk and want to use the same API to browse some remote websites. This could be useful for some crawling jobs for example.

Laravel Dusk can be un-secure to run on a production application due to the fact it's tightly coupled to PHPUnit and User Authentication, so this is a lighter version of Laravel Dusk which doesn't interact with any of this.

Usage
-----

[](#usage)

```
DuskBrowser::browse(function ($browser) {
    $altTextLogo = $browser->visit('https://www.google.com')
        ->attribute('#hplogo', 'alt');
});
// You can make other calls using DuskBrowser::browse()...
DuskBrowser::quit(); // **mandatory** so Dusk Browser cleans up processes behind him
```

Installation
------------

[](#installation)

`composer require dusk-browser/dusk-browser`

Laravel Dusk Browser comes with two commands, identical to Laravel Dusk: `dusk-browser:install` and `dusk-browser:chrome-driver`.

After installing the package, run the `dusk-browser:install` Artisan command:

`php artisan dusk-browser:install`

A `dusk-browser` directory will be created within your `storage/app` directory. Similar to Laravel Dusk, some screenshots and console logs of failed browsing sessions will be captured there.

For managing ChromeDriver installations, you can refer to the official [Laravel Dusk documentation](https://laravel.com/docs/5.8/dusk#managing-chromedriver-installations). This package comes with the Chrome Driver binaries for Chrome 76.

Documentation
-------------

[](#documentation)

Because Laravel Dusk Browser is based on Laravel Dusk, they share quite a lot in common.

Based on [Laravel Dusk documentation](https://laravel.com/docs/5.8/dusk), this is what Laravel Dusk Browser doesn't support:

- Generating Tests
- Running Tests
- Environment Handling
- Authentication
- Database Migrations
- Making any sort of assertion
- Using Page and Component classes with shorthand selectors
- Components

Similar to Laravel Dusk, Laravel Dusk Browser comes with Google Chrome browser and Google ChromeDriver integration out of the box.

However, you are still free to use any other browser/driver combination by overriding the default invokable class used to resolve the driver to use.

To do so, you will need to publish the config file of the package using

`php artisan vendor:publish --provider="DuskBrowser\ServiceProvider"`

and specify your own `remote_web_driver` class name.

Feel free to copy the default class `DuskBrowser\ChromeRemoteWebDriver` over to your own application and simply modify/rename it to your needs, as long as it implements `DuskBrowser\Contracts\RemoteWebDriverContract`. For a Selenium driver using a phantomjs browser you might see something like:

```
/**
 * Create the RemoteWebDriver instance.
 *
 * @return \Facebook\WebDriver\Remote\RemoteWebDriver
 */
public function __invoke()
{
    return RemoteWebDriver::create(
        config('dusk-browser.remote_web_driver_url'), DesiredCapabilities::phantomjs()
    );
}
```

We recommend you to keep using the `config()` helper here as this is used in order to do some additional checks on which driver is instantiated. Depending on your web driver (Selenium, ChromeDriver...) `remote_web_driver_url` could change too.

License
-------

[](#license)

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

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1cd981d08d894e44dd73e065bca587a8e1e2d61884bbac6964f6c4476ce6779c?d=identicon)[Claymm](/maintainers/Claymm)

---

Top Contributors

[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (319 commits)")[![driesvints](https://avatars.githubusercontent.com/u/594614?v=4)](https://github.com/driesvints "driesvints (94 commits)")[![clemblanco](https://avatars.githubusercontent.com/u/668419?v=4)](https://github.com/clemblanco "clemblanco (37 commits)")[![deleugpn](https://avatars.githubusercontent.com/u/9533181?v=4)](https://github.com/deleugpn "deleugpn (31 commits)")[![browner12](https://avatars.githubusercontent.com/u/5232313?v=4)](https://github.com/browner12 "browner12 (22 commits)")[![staudenmeir](https://avatars.githubusercontent.com/u/1853169?v=4)](https://github.com/staudenmeir "staudenmeir (20 commits)")[![calebporzio](https://avatars.githubusercontent.com/u/3670578?v=4)](https://github.com/calebporzio "calebporzio (19 commits)")[![aand18](https://avatars.githubusercontent.com/u/36073609?v=4)](https://github.com/aand18 "aand18 (12 commits)")[![sileence](https://avatars.githubusercontent.com/u/237530?v=4)](https://github.com/sileence "sileence (11 commits)")[![mnabialek](https://avatars.githubusercontent.com/u/7656807?v=4)](https://github.com/mnabialek "mnabialek (11 commits)")[![themsaid](https://avatars.githubusercontent.com/u/4332182?v=4)](https://github.com/themsaid "themsaid (7 commits)")[![SjorsO](https://avatars.githubusercontent.com/u/7202674?v=4)](https://github.com/SjorsO "SjorsO (7 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (6 commits)")[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (6 commits)")[![spyric](https://avatars.githubusercontent.com/u/2044754?v=4)](https://github.com/spyric "spyric (5 commits)")[![Janiaje](https://avatars.githubusercontent.com/u/25385437?v=4)](https://github.com/Janiaje "Janiaje (4 commits)")[![inxilpro](https://avatars.githubusercontent.com/u/21592?v=4)](https://github.com/inxilpro "inxilpro (4 commits)")[![nesk](https://avatars.githubusercontent.com/u/817508?v=4)](https://github.com/nesk "nesk (4 commits)")[![ockle](https://avatars.githubusercontent.com/u/2755069?v=4)](https://github.com/ockle "ockle (4 commits)")[![splatEric](https://avatars.githubusercontent.com/u/2445288?v=4)](https://github.com/splatEric "splatEric (4 commits)")

### Embed Badge

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

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

PHPackages © 2026

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