12 Alasan Mengapa Laravel adalah PHP Framework Terbaik dalam ...
Apalagi, dengan hadirnya Software House seperti Softwareseni yang siap membantu Anda membuat atau mengembangkan aplikasi mobile, web, dll. Siapa pun kini bisa ...
Laravel Dusk
Selain bisa melakukan tes terhadap komponen di dalam aplikasi, Anda pun dapat melakukan sejumlah tes lain yang tidak kalah penting. Mulai dari HTTP Test untuk memeriksa respons aplikasi terhadap HTTP request, Console Test untuk mengecek aplikasi konsol yang menerima data pengguna, hingga Browser Test melalui fitur <anchor>Laravel Dusk</anchor>  untuk melakukan pengetesan API.
Laravel Dusk - Laravel 8.x - The PHP Framework For Web Artisans
Laravel Dusk - Laravel 8.x - The PHP Framework For Web Artisans[Skip to content](#main-content)

Get started with PHP and Laravel faster than ever using [Laravel Herd](https://herd.laravel.com).


Join us in Dallas, TX! Tickets are now available for [Laracon US](https://laracon.us).


Let's go to India! Tickets are now available for [Laracon IN](https://laracon.in).


Let's go to Europe! Tickets are now available for [Laracon EU](https://laracon.eu).


Let's go down under! Tickets are now available for [Laracon AU](https://laracon.au).


Servers with PHP 8.3 are now available for provisioning via [Laravel Forge](https://forge.laravel.com).


Deploy Laravel with the infinite scale of serverless using [Laravel Vapor](https://vapor.laravel.com).


Join the waitlist for [Laravel Cloud](https://cloud.laravel.com), the future of shipping.


How's your health? Check your application's vital signs using [Laravel Pulse](https://pulse.laravel.com).


Incoming transmission received. [Laravel Reverb](https://reverb.laravel.com) is now available!


Take your administration backend to another dimension with [Laravel Nova](https://nova.laravel.com).


Laravel is hiring! [Help us build the future of Laravel](https://laravel.com/careers).


[![Laravel](/img/logomark.min.svg)![Laravel](/img/logotype.min.svg)](/)

- ## Prologue

  - [Release Notes](/docs/8.x/releases)
  - [Upgrade Guide](/docs/8.x/upgrade)
  - [Contribution Guide](/docs/8.x/contributions)
- ## Getting Started

  - [Installation](/docs/8.x/installation)
  - [Configuration](/docs/8.x/configuration)
  - [Directory Structure](/docs/8.x/structure)
  - [Starter Kits](/docs/8.x/starter-kits)
  - [Deployment](/docs/8.x/deployment)
- ## Architecture Concepts

  - [Request Lifecycle](/docs/8.x/lifecycle)
  - [Service Container](/docs/8.x/container)
  - [Service Providers](/docs/8.x/providers)
  - [Facades](/docs/8.x/facades)
- ## The Basics

  - [Routing](/docs/8.x/routing)
  - [Middleware](/docs/8.x/middleware)
  - [CSRF Protection](/docs/8.x/csrf)
  - [Controllers](/docs/8.x/controllers)
  - [Requests](/docs/8.x/requests)
  - [Responses](/docs/8.x/responses)
  - [Views](/docs/8.x/views)
  - [Blade Templates](/docs/8.x/blade)
  - [URL Generation](/docs/8.x/urls)
  - [Session](/docs/8.x/session)
  - [Validation](/docs/8.x/validation)
  - [Error Handling](/docs/8.x/errors)
  - [Logging](/docs/8.x/logging)
- ## Digging Deeper

  - [Artisan Console](/docs/8.x/artisan)
  - [Broadcasting](/docs/8.x/broadcasting)
  - [Cache](/docs/8.x/cache)
  - [Collections](/docs/8.x/collections)
  - [Compiling Assets](/docs/8.x/mix)
  - [Contracts](/docs/8.x/contracts)
  - [Events](/docs/8.x/events)
  - [File Storage](/docs/8.x/filesystem)
  - [Helpers](/docs/8.x/helpers)
  - [HTTP Client](/docs/8.x/http-client)
  - [Localization](/docs/8.x/localization)
  - [Mail](/docs/8.x/mail)
  - [Notifications](/docs/8.x/notifications)
  - [Package Development](/docs/8.x/packages)
  - [Queues](/docs/8.x/queues)
  - [Rate Limiting](/docs/8.x/rate-limiting)
  - [Task Scheduling](/docs/8.x/scheduling)
- ## Security

  - [Authentication](/docs/8.x/authentication)
  - [Authorization](/docs/8.x/authorization)
  - [Email Verification](/docs/8.x/verification)
  - [Encryption](/docs/8.x/encryption)
  - [Hashing](/docs/8.x/hashing)
  - [Password Reset](/docs/8.x/passwords)
- ## Database

  - [Getting Started](/docs/8.x/database)
  - [Query Builder](/docs/8.x/queries)
  - [Pagination](/docs/8.x/pagination)
  - [Migrations](/docs/8.x/migrations)
  - [Seeding](/docs/8.x/seeding)
  - [Redis](/docs/8.x/redis)
- ## Eloquent ORM

  - [Getting Started](/docs/8.x/eloquent)
  - [Relationships](/docs/8.x/eloquent-relationships)
  - [Collections](/docs/8.x/eloquent-collections)
  - [Mutators / Casts](/docs/8.x/eloquent-mutators)
  - [API Resources](/docs/8.x/eloquent-resources)
  - [Serialization](/docs/8.x/eloquent-serialization)
- ## Testing

  - [Getting Started](/docs/8.x/testing)
  - [HTTP Tests](/docs/8.x/http-tests)
  - [Console Tests](/docs/8.x/console-tests)
  - [Browser Tests](/docs/8.x/dusk)
  - [Database](/docs/8.x/database-testing)
  - [Mocking](/docs/8.x/mocking)
- ## Packages

  - [Breeze](/docs/8.x/starter-kits#laravel-breeze)
  - [Cashier (Stripe)](/docs/8.x/billing)
  - [Cashier (Paddle)](/docs/8.x/cashier-paddle)
  - [Dusk](/docs/8.x/dusk)
  - [Envoy](/docs/8.x/envoy)
  - [Fortify](/docs/8.x/fortify)
  - [Homestead](/docs/8.x/homestead)
  - [Horizon](/docs/8.x/horizon)
  - [Jetstream](https://jetstream.laravel.com)
  - [Octane](/docs/8.x/octane)
  - [Passport](/docs/8.x/passport)
  - [Sail](/docs/8.x/sail)
  - [Sanctum](/docs/8.x/sanctum)
  - [Scout](/docs/8.x/scout)
  - [Socialite](/docs/8.x/socialite)
  - [Telescope](/docs/8.x/telescope)
  - [Valet](/docs/8.x/valet)
- [API Documentation](/api/8.x)

Laravel Forge: create and manage PHP 8 servers. Deploy your Laravel applications in seconds. [Sign up now!](https://forge.laravel.com).


Laravel Vapor: experience extreme scale on a dedicated serverless platform for Laravel. [Sign up now!](https://vapor.laravel.com).


Laravel Nova: The next generation of Nova is [now available](https://nova.laravel.com).


Laravel Pulse: How's your health? Check your application's vital signs using [Laravel Pulse](https://pulse.laravel.com).


Laravel Reverb: You can easily build dynamic, real-time Laravel applications using WebSockets. [Laravel Reverb](https://reverb.laravel.com) is now available!


[![Laravel](/img/logomark.min.svg)![Laravel](/img/logotype.min.svg)](/)

- ## Prologue

  - [Release Notes](/docs/8.x/releases)
  - [Upgrade Guide](/docs/8.x/upgrade)
  - [Contribution Guide](/docs/8.x/contributions)
- ## Getting Started

  - [Installation](/docs/8.x/installation)
  - [Configuration](/docs/8.x/configuration)
  - [Directory Structure](/docs/8.x/structure)
  - [Starter Kits](/docs/8.x/starter-kits)
  - [Deployment](/docs/8.x/deployment)
- ## Architecture Concepts

  - [Request Lifecycle](/docs/8.x/lifecycle)
  - [Service Container](/docs/8.x/container)
  - [Service Providers](/docs/8.x/providers)
  - [Facades](/docs/8.x/facades)
- ## The Basics

  - [Routing](/docs/8.x/routing)
  - [Middleware](/docs/8.x/middleware)
  - [CSRF Protection](/docs/8.x/csrf)
  - [Controllers](/docs/8.x/controllers)
  - [Requests](/docs/8.x/requests)
  - [Responses](/docs/8.x/responses)
  - [Views](/docs/8.x/views)
  - [Blade Templates](/docs/8.x/blade)
  - [URL Generation](/docs/8.x/urls)
  - [Session](/docs/8.x/session)
  - [Validation](/docs/8.x/validation)
  - [Error Handling](/docs/8.x/errors)
  - [Logging](/docs/8.x/logging)
- ## Digging Deeper

  - [Artisan Console](/docs/8.x/artisan)
  - [Broadcasting](/docs/8.x/broadcasting)
  - [Cache](/docs/8.x/cache)
  - [Collections](/docs/8.x/collections)
  - [Compiling Assets](/docs/8.x/mix)
  - [Contracts](/docs/8.x/contracts)
  - [Events](/docs/8.x/events)
  - [File Storage](/docs/8.x/filesystem)
  - [Helpers](/docs/8.x/helpers)
  - [HTTP Client](/docs/8.x/http-client)
  - [Localization](/docs/8.x/localization)
  - [Mail](/docs/8.x/mail)
  - [Notifications](/docs/8.x/notifications)
  - [Package Development](/docs/8.x/packages)
  - [Queues](/docs/8.x/queues)
  - [Rate Limiting](/docs/8.x/rate-limiting)
  - [Task Scheduling](/docs/8.x/scheduling)
- ## Security

  - [Authentication](/docs/8.x/authentication)
  - [Authorization](/docs/8.x/authorization)
  - [Email Verification](/docs/8.x/verification)
  - [Encryption](/docs/8.x/encryption)
  - [Hashing](/docs/8.x/hashing)
  - [Password Reset](/docs/8.x/passwords)
- ## Database

  - [Getting Started](/docs/8.x/database)
  - [Query Builder](/docs/8.x/queries)
  - [Pagination](/docs/8.x/pagination)
  - [Migrations](/docs/8.x/migrations)
  - [Seeding](/docs/8.x/seeding)
  - [Redis](/docs/8.x/redis)
- ## Eloquent ORM

  - [Getting Started](/docs/8.x/eloquent)
  - [Relationships](/docs/8.x/eloquent-relationships)
  - [Collections](/docs/8.x/eloquent-collections)
  - [Mutators / Casts](/docs/8.x/eloquent-mutators)
  - [API Resources](/docs/8.x/eloquent-resources)
  - [Serialization](/docs/8.x/eloquent-serialization)
- ## Testing

  - [Getting Started](/docs/8.x/testing)
  - [HTTP Tests](/docs/8.x/http-tests)
  - [Console Tests](/docs/8.x/console-tests)
  - [Browser Tests](/docs/8.x/dusk)
  - [Database](/docs/8.x/database-testing)
  - [Mocking](/docs/8.x/mocking)
- ## Packages

  - [Breeze](/docs/8.x/starter-kits#laravel-breeze)
  - [Cashier (Stripe)](/docs/8.x/billing)
  - [Cashier (Paddle)](/docs/8.x/cashier-paddle)
  - [Dusk](/docs/8.x/dusk)
  - [Envoy](/docs/8.x/envoy)
  - [Fortify](/docs/8.x/fortify)
  - [Homestead](/docs/8.x/homestead)
  - [Horizon](/docs/8.x/horizon)
  - [Jetstream](https://jetstream.laravel.com)
  - [Octane](/docs/8.x/octane)
  - [Passport](/docs/8.x/passport)
  - [Sail](/docs/8.x/sail)
  - [Sanctum](/docs/8.x/sanctum)
  - [Scout](/docs/8.x/scout)
  - [Socialite](/docs/8.x/socialite)
  - [Telescope](/docs/8.x/telescope)
  - [Valet](/docs/8.x/valet)
- [API Documentation](/api/8.x)

Version

Master11.x10.x9.x8.x7.x6.x5.85.75.65.55.45.35.25.15.04.2![](/img/icons/drop_arrow.min.svg)![](/img/icons/drop_arrow.dark.min.svg)

> exclamation
>
> **WARNING** You're browsing the documentation for an old version of Laravel.
> Consider upgrading your project to [Laravel 11.x](https://laravel.com/docs/11.x).

# Laravel Dusk

- [Introduction](#introduction)
- [Installation](#installation)  - [Managing ChromeDriver Installations](#managing-chromedriver-installations)
  - [Using Other Browsers](#using-other-browsers)
- [Getting Started](#getting-started)  - [Generating Tests](#generating-tests)
  - [Database Migrations](#migrations)
  - [Running Tests](#running-tests)
  - [Environment Handling](#environment-handling)
- [Browser Basics](#browser-basics)  - [Creating Browsers](#creating-browsers)
  - [Navigation](#navigation)
  - [Resizing Browser Windows](#resizing-browser-windows)
  - [Browser Macros](#browser-macros)
  - [Authentication](#authentication)
  - [Cookies](#cookies)
  - [Executing JavaScript](#executing-javascript)
  - [Taking A Screenshot](#taking-a-screenshot)
  - [Storing Console Output To Disk](#storing-console-output-to-disk)
  - [Storing Page Source To Disk](#storing-page-source-to-disk)
- [Interacting With Elements](#interacting-with-elements)  - [Dusk Selectors](#dusk-selectors)
  - [Text, Values, & Attributes](#text-values-and-attributes)
  - [Interacting With Forms](#interacting-with-forms)
  - [Attaching Files](#attaching-files)
  - [Pressing Buttons](#pressing-buttons)
  - [Clicking Links](#clicking-links)
  - [Using The Keyboard](#using-the-keyboard)
  - [Using The Mouse](#using-the-mouse)
  - [JavaScript Dialogs](#javascript-dialogs)
  - [Scoping Selectors](#scoping-selectors)
  - [Waiting For Elements](#waiting-for-elements)
  - [Scrolling An Element Into View](#scrolling-an-element-into-view)
- [Available Assertions](#available-assertions)
- [Pages](#pages)  - [Generating Pages](#generating-pages)
  - [Configuring Pages](#configuring-pages)
  - [Navigating To Pages](#navigating-to-pages)
  - [Shorthand Selectors](#shorthand-selectors)
  - [Page Methods](#page-methods)
- [Components](#components)  - [Generating Components](#generating-components)
  - [Using Components](#using-components)
- [Continuous Integration](#continuous-integration)  - [Heroku CI](#running-tests-on-heroku-ci)
  - [Travis CI](#running-tests-on-travis-ci)
  - [GitHub Actions](#running-tests-on-github-actions)

## [Introduction](\#introduction)

[Laravel Dusk](https://github.com/laravel/dusk) provides an expressive, easy-to-use browser automation and testing API. By default, Dusk does not require you to install JDK or Selenium on your local computer. Instead, Dusk uses a standalone [ChromeDriver](https://sites.google.com/chromium.org/driver) installation. However, you are free to utilize any other Selenium compatible driver you wish.

## [Installation](\#installation)

To get started, you should install [Google Chrome](https://www.google.com/chrome) and add the `laravel/dusk` Composer dependency to your project:

```torchlight

composer require --dev laravel/dusk
```

exclamation

If you are manually registering Dusk's service provider, you should **never** register it in your production environment, as doing so could lead to arbitrary users being able to authenticate with your application.

After installing the Dusk package, execute the `dusk:install` Artisan command. The `dusk:install` command will create a `tests/Browser` directory and an example Dusk test:

```torchlight

php artisan dusk:install
```

Next, set the `APP_URL` environment variable in your application's `.env` file. This value should match the URL you use to access your application in a browser.

lightbulb

If you are using [Laravel Sail](/docs/8.x/sail) to manage your local development environment, please also consult the Sail documentation on [configuring and running Dusk tests](/docs/8.x/sail#laravel-dusk).

### [Managing ChromeDriver Installations](\#managing-chromedriver-installations)

If you would like to install a different version of ChromeDriver than what is included with Laravel Dusk, you may use the `dusk:chrome-driver` command:

```torchlight

# Install the latest version of ChromeDriver for your OS...
php artisan dusk:chrome-driver

# Install a given version of ChromeDriver for your OS...
php artisan dusk:chrome-driver 86

# Install a given version of ChromeDriver for all supported OSs...
php artisan dusk:chrome-driver --all

# Install the version of ChromeDriver that matches the detected version of Chrome / Chromium for your OS...
php artisan dusk:chrome-driver --detect
```

exclamation

Dusk requires the `chromedriver` binaries to be executable. If you're having problems running Dusk, you should ensure the binaries are executable using the following command: `chmod -R 0755 vendor/laravel/dusk/bin/`.

### [Using Other Browsers](\#using-other-browsers)

By default, Dusk uses Google Chrome and a standalone [ChromeDriver](https://sites.google.com/chromium.org/driver) installation to run your browser tests. However, you may start your own Selenium server and run your tests against any browser you wish.

To get started, open your `tests/DuskTestCase.php` file, which is the base Dusk test case for your application. Within this file, you can remove the call to the `startChromeDriver` method. This will stop Dusk from automatically starting the ChromeDriver:

```torchlight

/**
 * Prepare for Dusk test execution.
 *
 * @beforeClass
 * @return void
 */
public static function prepare()
{
    // static::startChromeDriver();
}
```

Next, you may modify the `driver` method to connect to the URL and port of your choice. In addition, you may modify the "desired capabilities" that should be passed to the WebDriver:

```torchlight

/**
 * Create the RemoteWebDriver instance.
 *
 * @return \Facebook\WebDriver\Remote\RemoteWebDriver
 */
protected function driver()
{
    return RemoteWebDriver::create(
        'http://localhost:4444/wd/hub', DesiredCapabilities::phantomjs()
    );
}
```

## [Getting Started](\#getting-started)

### [Generating Tests](\#generating-tests)

To generate a Dusk test, use the `dusk:make` Artisan command. The generated test will be placed in the `tests/Browser` directory:

```torchlight

php artisan dusk:make LoginTest
```

### [Database Migrations](\#migrations)

Most of the tests you write will interact with pages that retrieve data from your application's database; however, your Dusk tests should never use the `RefreshDatabase ` trait. The `RefreshDatabase` trait leverages database transactions which will not be applicable or available across HTTP requests. Instead, use the `DatabaseMigrations` trait, which re-migrates the database for each test:

```torchlight

<?php

namespace Tests\Browser;

use App\Models\User;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\Dusk\Chrome;
use Tests\DuskTestCase;

class ExampleTest extends DuskTestCase
{
    use DatabaseMigrations;
}
```

exclamation

SQLite in-memory databases may not be used when executing Dusk tests. Since the browser executes within its own process, it will not be able to access the in-memory databases of other processes.

### [Running Tests](\#running-tests)

To run your browser tests, execute the `dusk` Artisan command:

```torchlight

php artisan dusk
```

If you had test failures the last time you ran the `dusk` command, you may save time by re-running the failing tests first using the `dusk:fails` command:

```torchlight

php artisan dusk:fails
```

The `dusk` command accepts any argument that is normally accepted by the PHPUnit test runner, such as allowing you to only run the tests for a given [group](https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group):

```torchlight

php artisan dusk --group=foo
```

lightbulb

If you are using [Laravel Sail](/docs/8.x/sail) to manage your local development environment, please consult the Sail documentation on [configuring and running Dusk tests](/docs/8.x/sail#laravel-dusk).

#### [Manually Starting ChromeDriver](\#manually-starting-chromedriver)

By default, Dusk will automatically attempt to start ChromeDriver. If this does not work for your particular system, you may manually start ChromeDriver before running the `dusk` command. If you choose to start ChromeDriver manually, you should comment out the following line of your `tests/DuskTestCase.php` file:

```torchlight

/**
 * Prepare for Dusk test execution.
 *
 * @beforeClass
 * @return void
 */
public static function prepare()
{
    // static::startChromeDriver();
}
```

In addition, if you start ChromeDriver on a port other than 9515, you should modify the `driver` method of the same class to reflect the correct port:

```torchlight

/**
 * Create the RemoteWebDriver instance.
 *
 * @return \Facebook\WebDriver\Remote\RemoteWebDriver
 */
protected function driver()
{
    return RemoteWebDriver::create(
        'http://localhost:9515', DesiredCapabilities::chrome()
    );
}
```

### [Environment Handling](\#environment-handling)

To force Dusk to use its own environment file when running tests, create a `.env.dusk.{environment}` file in the root of your project. For example, if you will be initiating the `dusk` command from your `local` environment, you should create a `.env.dusk.local` file.

When running tests, Dusk will back-up your `.env` file and rename your Dusk environment to `.env`. Once the tests have completed, your `.env` file will be restored.

## [Browser Basics](\#browser-basics)

### [Creating Browsers](\#creating-browsers)

To get started, let's write a test that verifies we can log into our application. After generating a test, we can modify it to navigate to the login page, enter some credentials, and click the "Login" button. To create a browser instance, you may call the `browse` method from within your Dusk test:

```torchlight

<?php

namespace Tests\Browser;

use App\Models\User;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\Dusk\Chrome;
use Tests\DuskTestCase;

class ExampleTest extends DuskTestCase
{
    use DatabaseMigrations;

    /**
     * A basic browser test example.
     *
     * @return void
     */
    public function test_basic_example()
    {
        $user = User::factory()->create([
            'email' => '[email protected]',
        ]);

        $this->browse(function ($browser) use ($user) {
            $browser->visit('/login')
                    ->type('email', $user->email)
                    ->type('password', 'password')
                    ->press('Login')
                    ->assertPathIs('/home');
        });
    }
}
```

As you can see in the example above, the `browse` method accepts a closure. A browser instance will automatically be passed to this closure by Dusk and is the main object used to interact with and make assertions against your application.

#### [Creating Multiple Browsers](\#creating-multiple-browsers)

Sometimes you may need multiple browsers in order to properly carry out a test. For example, multiple browsers may be needed to test a chat screen that interacts with websockets. To create multiple browsers, simply add more browser arguments to the signature of the closure given to the `browse` method:

```torchlight

$this->browse(function ($first, $second) {
    $first->loginAs(User::find(1))
          ->visit('/home')
          ->waitForText('Message');

    $second->loginAs(User::find(2))
           ->visit('/home')
           ->waitForText('Message')
           ->type('message', 'Hey Taylor')
           ->press('Send');

    $first->waitForText('Hey Taylor')
          ->assertSee('Jeffrey Way');
});
```

### [Navigation](\#navigation)

The `visit` method may be used to navigate to a given URI within your application:

```torchlight

$browser->visit('/login');
```

You may use the `visitRoute` method to navigate to a [named route](/docs/8.x/routing#named-routes):

```torchlight

$browser->visitRoute('login');
```

You may navigate "back" and "forward" using the `back` and `forward` methods:

```torchlight

$browser->back();

$browser->forward();
```

You may use the `refresh` method to refresh the page:

```torchlight

$browser->refresh();
```

### [Resizing Browser Windows](\#resizing-browser-windows)

You may use the `resize` method to adjust the size of the browser window:

```torchlight

$browser->resize(1920, 1080);
```

The `maximize` method may be used to maximize the browser window:

```torchlight

$browser->maximize();
```

The `fitContent` method will resize the browser window to match the size of its content:

```torchlight

$browser->fitContent();
```

When a test fails, Dusk will automatically resize the browser to fit the content prior to taking a screenshot. You may disable this feature by calling the `disableFitOnFailure` method within your test:

```torchlight

$browser->disableFitOnFailure();
```

You may use the `move` method to move the browser window to a different position on your screen:

```torchlight

$browser->move($x = 100, $y = 100);
```

### [Browser Macros](\#browser-macros)

If you would like to define a custom browser method that you can re-use in a variety of your tests, you may use the `macro` method on the `Browser` class. Typically, you should call this method from a [service provider's](/docs/8.x/providers) `boot` method:

```torchlight

<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Laravel\Dusk\Browser;

class DuskServiceProvider extends ServiceProvider
{
    /**
     * Register Dusk's browser macros.
     *
     * @return void
     */
    public function boot()
    {
        Browser::macro('scrollToElement', function ($element = null) {
            $this->script("$('html, body').animate({ scrollTop: $('$element').offset().top }, 0);");

            return $this;
        });
    }
}
```

The `macro` function accepts a name as its first argument, and a closure as its second. The macro's closure will be executed when calling the macro as a method on a `Browser` instance:

```torchlight

$this->browse(function ($browser) use ($user) {
    $browser->visit('/pay')
            ->scrollToElement('#credit-card-details')
            ->assertSee('Enter Credit Card Details');
});
```

### [Authentication](\#authentication)

Often, you will be testing pages that require authentication. You can use Dusk's `loginAs` method in order to avoid interacting with your application's login screen during every test. The `loginAs` method accepts a primary key associated with your authenticatable model or an authenticatable model instance:

```torchlight

use App\Models\User;

$this->browse(function ($browser) {
    $browser->loginAs(User::find(1))
          ->visit('/home');
});
```

exclamation

After using the `loginAs` method, the user session will be maintained for all tests within the file.

### [Cookies](\#cookies)

You may use the `cookie` method to get or set an encrypted cookie's value. By default, all of the cookies created by Laravel are encrypted:

```torchlight

$browser->cookie('name');

$browser->cookie('name', 'Taylor');
```

You may use the `plainCookie` method to get or set an unencrypted cookie's value:

```torchlight

$browser->plainCookie('name');

$browser->plainCookie('name', 'Taylor');
```

You may use the `deleteCookie` method to delete the given cookie:

```torchlight

$browser->deleteCookie('name');
```

### [Executing JavaScript](\#executing-javascript)

You may use the `script` method to execute arbitrary JavaScript statements within the browser:

```torchlight

$browser->script('document.documentElement.scrollTop = 0');

$browser->script([
    'document.body.scrollTop = 0',
    'document.documentElement.scrollTop = 0',
]);

$output = $browser->script('return window.location.pathname');
```

### [Taking A Screenshot](\#taking-a-screenshot)

You may use the `screenshot` method to take a screenshot and store it with the given filename. All screenshots will be stored within the `tests/Browser/screenshots` directory:

```torchlight

$browser->screenshot('filename');
```

### [Storing Console Output To Disk](\#storing-console-output-to-disk)

You may use the `storeConsoleLog` method to write the current browser's console output to disk with the given filename. Console output will be stored within the `tests/Browser/console` directory:

```torchlight

$browser->storeConsoleLog('filename');
```

### [Storing Page Source To Disk](\#storing-page-source-to-disk)

You may use the `storeSource` method to write the current page's source to disk with the given filename. The page source will be stored within the `tests/Browser/source` directory:

```torchlight

$browser->storeSource('filename');
```

## [Interacting With Elements](\#interacting-with-elements)

### [Dusk Selectors](\#dusk-selectors)

Choosing good CSS selectors for interacting with elements is one of the hardest parts of writing Dusk tests. Over time, frontend changes can cause CSS selectors like the following to break your tests:

```torchlight

// HTML...

<button>Login</button>

// Test...

$browser->click('.login-page .container div > button');
```

Dusk selectors allow you to focus on writing effective tests rather than remembering CSS selectors. To define a selector, add a `dusk` attribute to your HTML element. Then, when interacting with a Dusk browser, prefix the selector with `@` to manipulate the attached element within your test:

```torchlight

// HTML...

<button dusk="login-button">Login</button>

// Test...

$browser->click('@login-button');
```

### [Text, Values, & Attributes](\#text-values-and-attributes)

#### [Retrieving & Setting Values](\#retrieving-setting-values)

Dusk provides several methods for interacting with the current value, display text, and attributes of elements on the page. For example, to get the "value" of an element that matches a given CSS or Dusk selector, use the `value` method:

```torchlight

// Retrieve the value...
$value = $browser->value('selector');

// Set the value...
$browser->value('selector', 'value');
```

You may use the `inputValue` method to get the "value" of an input element that has a given field name:

```torchlight

$value = $browser->inputValue('field');
```

#### [Retrieving Text](\#retrieving-text)

The `text` method may be used to retrieve the display text of an element that matches the given selector:

```torchlight

$text = $browser->text('selector');
```

#### [Retrieving Attributes](\#retrieving-attributes)

Finally, the `attribute` method may be used to retrieve the value of an attribute of an element matching the given selector:

```torchlight

$attribute = $browser->attribute('selector', 'value');
```

### [Interacting With Forms](\#interacting-with-forms)

#### [Typing Values](\#typing-values)

Dusk provides a variety of methods for interacting with forms and input elements. First, let's take a look at an example of typing text into an input field:

```torchlight

$browser->type('email', '[email protected]');
```

Note that, although the method accepts one if necessary, we are not required to pass a CSS selector into the `type` method. If a CSS selector is not provided, Dusk will search for an `input` or `textarea` field with the given `name` attribute.

To append text to a field without clearing its content, you may use the `append` method:

```torchlight

$browser->type('tags', 'foo')
        ->append('tags', ', bar, baz');
```

You may clear the value of an input using the `clear` method:

```torchlight

$browser->clear('email');
```

You can instruct Dusk to type slowly using the `typeSlowly` method. By default, Dusk will pause for 100 milliseconds between key presses. To customize the amount of time between key presses, you may pass the appropriate number of milliseconds as the third argument to the method:

```torchlight

$browser->typeSlowly('mobile', '+1 (202) 555-5555');

$browser->typeSlowly('mobile', '+1 (202) 555-5555', 300);
```

You may use the `appendSlowly` method to append text slowly:

```torchlight

$browser->type('tags', 'foo')
        ->appendSlowly('tags', ', bar, baz');
```

#### [Dropdowns](\#dropdowns)

To select a value available on a `select` element, you may use the `select` method. Like the `type` method, the `select` method does not require a full CSS selector. When passing a value to the `select` method, you should pass the underlying option value instead of the display text:

```torchlight

$browser->select('size', 'Large');
```

You may select a random option by omitting the second argument:

```torchlight

$browser->select('size');
```

By providing an array as the second argument to the `select` method, you can instruct the method to select multiple options:

```torchlight

$browser->select('categories', ['Art', 'Music']);
```

#### [Checkboxes](\#checkboxes)

To "check" a checkbox input, you may use the `check` method. Like many other input related methods, a full CSS selector is not required. If a CSS selector match can't be found, Dusk will search for a checkbox with a matching `name` attribute:

```torchlight

$browser->check('terms');
```

The `uncheck` method may be used to "uncheck" a checkbox input:

```torchlight

$browser->uncheck('terms');
```

#### [Radio Buttons](\#radio-buttons)

To "select" a `radio` input option, you may use the `radio` method. Like many other input related methods, a full CSS selector is not required. If a CSS selector match can't be found, Dusk will search for a `radio` input with matching `name` and `value` attributes:

```torchlight

$browser->radio('size', 'large');
```

### [Attaching Files](\#attaching-files)

The `attach` method may be used to attach a file to a `file` input element. Like many other input related methods, a full CSS selector is not required. If a CSS selector match can't be found, Dusk will search for a `file` input with a matching `name` attribute:

```torchlight

$browser->attach('photo', __DIR__.'/photos/mountains.png');
```

exclamation

The attach function requires the `Zip` PHP extension to be installed and enabled on your server.

### [Pressing Buttons](\#pressing-buttons)

The `press` method may be used to click a button element on the page. The first argument given to the `press` method may be either the display text of the button or a CSS / Dusk selector:

```torchlight

$browser->press('Login');
```

When submitting forms, many application's disable the form's submission button after it is pressed and then re-enable the button when the form submission's HTTP request is complete. To press a button and wait for the button to be re-enabled, you may use the `pressAndWaitFor` method:

```torchlight

// Press the button and wait a maximum of 5 seconds for it to be enabled...
$browser->pressAndWaitFor('Save');

// Press the button and wait a maximum of 1 second for it to be enabled...
$browser->pressAndWaitFor('Save', 1);
```

### [Clicking Links](\#clicking-links)

To click a link, you may use the `clickLink` method on the browser instance. The `clickLink` method will click the link that has the given display text:

```torchlight

$browser->clickLink($linkText);
```

You may use the `seeLink` method to determine if a link with the given display text is visible on the page:

```torchlight

if ($browser->seeLink($linkText)) {
    // ...
}
```

exclamation

These methods interact with jQuery. If jQuery is not available on the page, Dusk will automatically inject it into the page so it is available for the test's duration.

### [Using The Keyboard](\#using-the-keyboard)

The `keys` method allows you to provide more complex input sequences to a given element than normally allowed by the `type` method. For example, you may instruct Dusk to hold modifier keys while entering values. In this example, the `shift` key will be held while `taylor` is entered into the element matching the given selector. After `taylor` is typed, `swift` will be typed without any modifier keys:

```torchlight

$browser->keys('selector', ['{shift}', 'taylor'], 'swift');
```

Another valuable use case for the `keys` method is sending a "keyboard shortcut" combination to the primary CSS selector for your application:

```torchlight

$browser->keys('.app', ['{command}', 'j']);
```

lightbulb

All modifier keys such as `{command}` are wrapped in `{}` characters, and match the constants defined in the `Facebook\WebDriver\WebDriverKeys` class, which can be [found on GitHub](https://github.com/php-webdriver/php-webdriver/blob/master/lib/WebDriverKeys.php).

### [Using The Mouse](\#using-the-mouse)

#### [Clicking On Elements](\#clicking-on-elements)

The `click` method may be used to click on an element matching the given CSS or Dusk selector:

```torchlight

$browser->click('.selector');
```

The `clickAtXPath` method may be used to click on an element matching the given XPath expression:

```torchlight

$browser->clickAtXPath('//div[@class = "selector"]');
```

The `clickAtPoint` method may be used to click on the topmost element at a given pair of coordinates relative to the viewable area of the browser:

```torchlight

$browser->clickAtPoint($x = 0, $y = 0);
```

The `doubleClick` method may be used to simulate the double click of a mouse:

```torchlight

$browser->doubleClick();
```

The `rightClick` method may be used to simulate the right click of a mouse:

```torchlight

$browser->rightClick();

$browser->rightClick('.selector');
```

The `clickAndHold` method may be used to simulate a mouse button being clicked and held down. A subsequent call to the `releaseMouse` method will undo this behavior and release the mouse button:

```torchlight

$browser->clickAndHold()
        ->pause(1000)
        ->releaseMouse();
```

#### [Mouseover](\#mouseover)

The `mouseover` method may be used when you need to move the mouse over an element matching the given CSS or Dusk selector:

```torchlight

$browser->mouseover('.selector');
```

#### [Drag & Drop](\#drag-drop)

The `drag` method may be used to drag an element matching the given selector to another element:

```torchlight

$browser->drag('.from-selector', '.to-selector');
```

Or, you may drag an element in a single direction:

```torchlight

$browser->dragLeft('.selector', $pixels = 10);
$browser->dragRight('.selector', $pixels = 10);
$browser->dragUp('.selector', $pixels = 10);
$browser->dragDown('.selector', $pixels = 10);
```

Finally, you may drag an element by a given offset:

```torchlight

$browser->dragOffset('.selector', $x = 10, $y = 10);
```

### [JavaScript Dialogs](\#javascript-dialogs)

Dusk provides various methods to interact with JavaScript Dialogs. For example, you may use the `waitForDialog` method to wait for a JavaScript dialog to appear. This method accepts an optional argument indicating how many seconds to wait for the dialog to appear:

```torchlight

$browser->waitForDialog($seconds = null);
```

The `assertDialogOpened` method may be used to assert that a dialog has been displayed and contains the given message:

```torchlight

$browser->assertDialogOpened('Dialog message');
```

If the JavaScript dialog contains a prompt, you may use the `typeInDialog` method to type a value into the prompt:

```torchlight

$browser->typeInDialog('Hello World');
```

To close an open JavaScript dialog by clicking the "OK" button, you may invoke the `acceptDialog` method:

```torchlight

$browser->acceptDialog();
```

To close an open JavaScript dialog by clicking the "Cancel" button, you may invoke the `dismissDialog` method:

```torchlight

$browser->dismissDialog();
```

### [Scoping Selectors](\#scoping-selectors)

Sometimes you may wish to perform several operations while scoping all of the operations within a given selector. For example, you may wish to assert that some text exists only within a table and then click a button within that table. You may use the `with` method to accomplish this. All operations performed within the closure given to the `with` method will be scoped to the original selector:

```torchlight

$browser->with('.table', function ($table) {
    $table->assertSee('Hello World')
          ->clickLink('Delete');
});
```

You may occasionally need to execute assertions outside of the current scope. You may use the `elsewhere` and `elsewhereWhenAvailable` methods to accomplish this:

```torchlight

$browser->with('.table', function ($table) {
   // Current scope is `body .table`...

   $browser->elsewhere('.page-title', function ($title) {
       // Current scope is `body .page-title`...
       $title->assertSee('Hello World');
   });

   $browser->elsewhereWhenAvailable('.page-title', function ($title) {
       // Current scope is `body .page-title`...
       $title->assertSee('Hello World');
   });
});
```

### [Waiting For Elements](\#waiting-for-elements)

When testing applications that use JavaScript extensively, it often becomes necessary to "wait" for certain elements or data to be available before proceeding with a test. Dusk makes this a cinch. Using a variety of methods, you may wait for elements to become visible on the page or even wait until a given JavaScript expression evaluates to `true`.

#### [Waiting](\#waiting)

If you just need to pause the test for a given number of milliseconds, use the `pause` method:

```torchlight

$browser->pause(1000);
```

#### [Waiting For Selectors](\#waiting-for-selectors)

The `waitFor` method may be used to pause the execution of the test until the element matching the given CSS or Dusk selector is displayed on the page. By default, this will pause the test for a maximum of five seconds before throwing an exception. If necessary, you may pass a custom timeout threshold as the second argument to the method:

```torchlight

// Wait a maximum of five seconds for the selector...
$browser->waitFor('.selector');

// Wait a maximum of one second for the selector...
$browser->waitFor('.selector', 1);
```

You may also wait until the element matching the given selector contains the given text:

```torchlight

// Wait a maximum of five seconds for the selector to contain the given text...
$browser->waitForTextIn('.selector', 'Hello World');

// Wait a maximum of one second for the selector to contain the given text...
$browser->waitForTextIn('.selector', 'Hello World', 1);
```

You may also wait until the element matching the given selector is missing from the page:

```torchlight

// Wait a maximum of five seconds until the selector is missing...
$browser->waitUntilMissing('.selector');

// Wait a maximum of one second until the selector is missing...
$browser->waitUntilMissing('.selector', 1);
```

Or, you may wait until the element matching the given selector is enabled or disabled:

```torchlight

// Wait a maximum of five seconds until the selector is enabled...
$browser->waitUntilEnabled('.selector');

// Wait a maximum of one second until the selector is enabled...
$browser->waitUntilEnabled('.selector', 1);

// Wait a maximum of five seconds until the selector is disabled...
$browser->waitUntilDisabled('.selector');

// Wait a maximum of one second until the selector is disabled...
$browser->waitUntilDisabled('.selector', 1);
```

#### [Scoping Selectors When Available](\#scoping-selectors-when-available)

Occasionally, you may wish to wait for an element to appear that matches a given selector and then interact with the element. For example, you may wish to wait until a modal window is available and then press the "OK" button within the modal. The `whenAvailable` method may be used to accomplish this. All element operations performed within the given closure will be scoped to the original selector:

```torchlight

$browser->whenAvailable('.modal', function ($modal) {
    $modal->assertSee('Hello World')
          ->press('OK');
});
```

#### [Waiting For Text](\#waiting-for-text)

The `waitForText` method may be used to wait until the given text is displayed on the page:

```torchlight

// Wait a maximum of five seconds for the text...
$browser->waitForText('Hello World');

// Wait a maximum of one second for the text...
$browser->waitForText('Hello World', 1);
```

You may use the `waitUntilMissingText` method to wait until the displayed text has been removed from the page:

```torchlight

// Wait a maximum of five seconds for the text to be removed...
$browser->waitUntilMissingText('Hello World');

// Wait a maximum of one second for the text to be removed...
$browser->waitUntilMissingText('Hello World', 1);
```

#### [Waiting For Links](\#waiting-for-links)

The `waitForLink` method may be used to wait until the given link text is displayed on the page:

```torchlight

// Wait a maximum of five seconds for the link...
$browser->waitForLink('Create');

// Wait a maximum of one second for the link...
$browser->waitForLink('Create', 1);
```

#### [Waiting On The Page Location](\#waiting-on-the-page-location)

When making a path assertion such as `$browser->assertPathIs('/home')`, the assertion can fail if `window.location.pathname` is being updated asynchronously. You may use the `waitForLocation` method to wait for the location to be a given value:

```torchlight

$browser->waitForLocation('/secret');
```

The `waitForLocation` method can also be used to wait for the current window location to be a fully qualified URL:

```torchlight

$browser->waitForLocation('https://example.com/path');
```

You may also wait for a [named route's](/docs/8.x/routing#named-routes) location:

```torchlight

$browser->waitForRoute($routeName, $parameters);
```

#### [Waiting for Page Reloads](\#waiting-for-page-reloads)

If you need to wait for a page to reload after performing an action, use the `waitForReload` method:

```torchlight

use Laravel\Dusk\Browser;

$browser->waitForReload(function (Browser $browser) {
    $browser->press('Submit');
})
->assertSee('Success!');
```

Since the need to wait for the page to reload typically occurs after clicking a button, you may use the `clickAndWaitForReload` method for convenience:

```torchlight

$browser->clickAndWaitForReload('.selector')
        ->assertSee('something');
```

#### [Waiting On JavaScript Expressions](\#waiting-on-javascript-expressions)

Sometimes you may wish to pause the execution of a test until a given JavaScript expression evaluates to `true`. You may easily accomplish this using the `waitUntil` method. When passing an expression to this method, you do not need to include the `return` keyword or an ending semi-colon:

```torchlight

// Wait a maximum of five seconds for the expression to be true...
$browser->waitUntil('App.data.servers.length > 0');

// Wait a maximum of one second for the expression to be true...
$browser->waitUntil('App.data.servers.length > 0', 1);
```

#### [Waiting On Vue Expressions](\#waiting-on-vue-expressions)

The `waitUntilVue` and `waitUntilVueIsNot` methods may be used to wait until a [Vue component](https://vuejs.org) attribute has a given value:

```torchlight

// Wait until the component attribute contains the given value...
$browser->waitUntilVue('user.name', 'Taylor', '@user');

// Wait until the component attribute doesn't contain the given value...
$browser->waitUntilVueIsNot('user.name', null, '@user');
```

#### [Waiting With A Callback](\#waiting-with-a-callback)

Many of the "wait" methods in Dusk rely on the underlying `waitUsing` method. You may use this method directly to wait for a given closure to return `true`. The `waitUsing` method accepts the maximum number of seconds to wait, the interval at which the closure should be evaluated, the closure, and an optional failure message:

```torchlight

$browser->waitUsing(10, 1, function () use ($something) {
    return $something->isReady();
}, "Something wasn't ready in time.");
```

### [Scrolling An Element Into View](\#scrolling-an-element-into-view)

Sometimes you may not be able to click on an element because it is outside of the viewable area of the browser. The `scrollIntoView` method will scroll the browser window until the element at the given selector is within the view:

```torchlight

$browser->scrollIntoView('.selector')
        ->click('.selector');
```

## [Available Assertions](\#available-assertions)

Dusk provides a variety of assertions that you may make against your application. All of the available assertions are documented in the list below:

[assertTitle](#assert-title) [assertTitleContains](#assert-title-contains) [assertUrlIs](#assert-url-is) [assertSchemeIs](#assert-scheme-is) [assertSchemeIsNot](#assert-scheme-is-not) [assertHostIs](#assert-host-is) [assertHostIsNot](#assert-host-is-not) [assertPortIs](#assert-port-is) [assertPortIsNot](#assert-port-is-not) [assertPathBeginsWith](#assert-path-begins-with) [assertPathIs](#assert-path-is) [assertPathIsNot](#assert-path-is-not) [assertRouteIs](#assert-route-is) [assertQueryStringHas](#assert-query-string-has) [assertQueryStringMissing](#assert-query-string-missing) [assertFragmentIs](#assert-fragment-is) [assertFragmentBeginsWith](#assert-fragment-begins-with) [assertFragmentIsNot](#assert-fragment-is-not) [assertHasCookie](#assert-has-cookie) [assertHasPlainCookie](#assert-has-plain-cookie) [assertCookieMissing](#assert-cookie-missing) [assertPlainCookieMissing](#assert-plain-cookie-missing) [assertCookieValue](#assert-cookie-value) [assertPlainCookieValue](#assert-plain-cookie-value) [assertSee](#assert-see) [assertDontSee](#assert-dont-see) [assertSeeIn](#assert-see-in) [assertDontSeeIn](#assert-dont-see-in) [assertSeeAnythingIn](#assert-see-anything-in) [assertSeeNothingIn](#assert-see-nothing-in) [assertScript](#assert-script) [assertSourceHas](#assert-source-has) [assertSourceMissing](#assert-source-missing) [assertSeeLink](#assert-see-link) [assertDontSeeLink](#assert-dont-see-link) [assertInputValue](#assert-input-value) [assertInputValueIsNot](#assert-input-value-is-not) [assertChecked](#assert-checked) [assertNotChecked](#assert-not-checked) [assertRadioSelected](#assert-radio-selected) [assertRadioNotSelected](#assert-radio-not-selected) [assertSelected](#assert-selected) [assertNotSelected](#assert-not-selected) [assertSelectHasOptions](#assert-select-has-options) [assertSelectMissingOptions](#assert-select-missing-options) [assertSelectHasOption](#assert-select-has-option) [assertSelectMissingOption](#assert-select-missing-option) [assertValue](#assert-value) [assertValueIsNot](#assert-value-is-not) [assertAttribute](#assert-attribute) [assertAttributeContains](#assert-attribute-contains) [assertAriaAttribute](#assert-aria-attribute) [assertDataAttribute](#assert-data-attribute) [assertVisible](#assert-visible) [assertPresent](#assert-present) [assertNotPresent](#assert-not-present) [assertMissing](#assert-missing) [assertInputPresent](#assert-input-present) [assertInputMissing](#assert-input-missing) [assertDialogOpened](#assert-dialog-opened) [assertEnabled](#assert-enabled) [assertDisabled](#assert-disabled) [assertButtonEnabled](#assert-button-enabled) [assertButtonDisabled](#assert-button-disabled) [assertFocused](#assert-focused) [assertNotFocused](#assert-not-focused) [assertAuthenticated](#assert-authenticated) [assertGuest](#assert-guest) [assertAuthenticatedAs](#assert-authenticated-as) [assertVue](#assert-vue) [assertVueIsNot](#assert-vue-is-not) [assertVueContains](#assert-vue-contains) [assertVueDoesNotContain](#assert-vue-does-not-contain)

#### [assertTitle](\#assert-title)

Assert that the page title matches the given text:

```torchlight

$browser->assertTitle($title);
```

#### [assertTitleContains](\#assert-title-contains)

Assert that the page title contains the given text:

```torchlight

$browser->assertTitleContains($title);
```

#### [assertUrlIs](\#assert-url-is)

Assert that the current URL (without the query string) matches the given string:

```torchlight

$browser->assertUrlIs($url);
```

#### [assertSchemeIs](\#assert-scheme-is)

Assert that the current URL scheme matches the given scheme:

```torchlight

$browser->assertSchemeIs($scheme);
```

#### [assertSchemeIsNot](\#assert-scheme-is-not)

Assert that the current URL scheme does not match the given scheme:

```torchlight

$browser->assertSchemeIsNot($scheme);
```

#### [assertHostIs](\#assert-host-is)

Assert that the current URL host matches the given host:

```torchlight

$browser->assertHostIs($host);
```

#### [assertHostIsNot](\#assert-host-is-not)

Assert that the current URL host does not match the given host:

```torchlight

$browser->assertHostIsNot($host);
```

#### [assertPortIs](\#assert-port-is)

Assert that the current URL port matches the given port:

```torchlight

$browser->assertPortIs($port);
```

#### [assertPortIsNot](\#assert-port-is-not)

Assert that the current URL port does not match the given port:

```torchlight

$browser->assertPortIsNot($port);
```

#### [assertPathBeginsWith](\#assert-path-begins-with)

Assert that the current URL path begins with the given path:

```torchlight

$browser->assertPathBeginsWith('/home');
```

#### [assertPathIs](\#assert-path-is)

Assert that the current path matches the given path:

```torchlight

$browser->assertPathIs('/home');
```

#### [assertPathIsNot](\#assert-path-is-not)

Assert that the current path does not match the given path:

```torchlight

$browser->assertPathIsNot('/home');
```

#### [assertRouteIs](\#assert-route-is)

Assert that the current URL matches the given [named route's](/docs/8.x/routing#named-routes) URL:

```torchlight

$browser->assertRouteIs($name, $parameters);
```

#### [assertQueryStringHas](\#assert-query-string-has)

Assert that the given query string parameter is present:

```torchlight

$browser->assertQueryStringHas($name);
```

Assert that the given query string parameter is present and has a given value:

```torchlight

$browser->assertQueryStringHas($name, $value);
```

#### [assertQueryStringMissing](\#assert-query-string-missing)

Assert that the given query string parameter is missing:

```torchlight

$browser->assertQueryStringMissing($name);
```

#### [assertFragmentIs](\#assert-fragment-is)

Assert that the URL's current hash fragment matches the given fragment:

```torchlight

$browser->assertFragmentIs('anchor');
```

#### [assertFragmentBeginsWith](\#assert-fragment-begins-with)

Assert that the URL's current hash fragment begins with the given fragment:

```torchlight

$browser->assertFragmentBeginsWith('anchor');
```

#### [assertFragmentIsNot](\#assert-fragment-is-not)

Assert that the URL's current hash fragment does not match the given fragment:

```torchlight

$browser->assertFragmentIsNot('anchor');
```

#### [assertHasCookie](\#assert-has-cookie)

Assert that the given encrypted cookie is present:

```torchlight

$browser->assertHasCookie($name);
```

#### [assertHasPlainCookie](\#assert-has-plain-cookie)

Assert that the given unencrypted cookie is present:

```torchlight

$browser->assertHasPlainCookie($name);
```

#### [assertCookieMissing](\#assert-cookie-missing)

Assert that the given encrypted cookie is not present:

```torchlight

$browser->assertCookieMissing($name);
```

#### [assertPlainCookieMissing](\#assert-plain-cookie-missing)

Assert that the given unencrypted cookie is not present:

```torchlight

$browser->assertPlainCookieMissing($name);
```

#### [assertCookieValue](\#assert-cookie-value)

Assert that an encrypted cookie has a given value:

```torchlight

$browser->assertCookieValue($name, $value);
```

#### [assertPlainCookieValue](\#assert-plain-cookie-value)

Assert that an unencrypted cookie has a given value:

```torchlight

$browser->assertPlainCookieValue($name, $value);
```

#### [assertSee](\#assert-see)

Assert that the given text is present on the page:

```torchlight

$browser->assertSee($text);
```

#### [assertDontSee](\#assert-dont-see)

Assert that the given text is not present on the page:

```torchlight

$browser->assertDontSee($text);
```

#### [assertSeeIn](\#assert-see-in)

Assert that the given text is present within the selector:

```torchlight

$browser->assertSeeIn($selector, $text);
```

#### [assertDontSeeIn](\#assert-dont-see-in)

Assert that the given text is not present within the selector:

```torchlight

$browser->assertDontSeeIn($selector, $text);
```

#### [assertSeeAnythingIn](\#assert-see-anything-in)

Assert that any text is present within the selector:

```torchlight

$browser->assertSeeAnythingIn($selector);
```

#### [assertSeeNothingIn](\#assert-see-nothing-in)

Assert that no text is present within the selector:

```torchlight

$browser->assertSeeNothingIn($selector);
```

#### [assertScript](\#assert-script)

Assert that the given JavaScript expression evaluates to the given value:

```torchlight

$browser->assertScript('window.isLoaded')
        ->assertScript('document.readyState', 'complete');
```

#### [assertSourceHas](\#assert-source-has)

Assert that the given source code is present on the page:

```torchlight

$browser->assertSourceHas($code);
```

#### [assertSourceMissing](\#assert-source-missing)

Assert that the given source code is not present on the page:

```torchlight

$browser->assertSourceMissing($code);
```

#### [assertSeeLink](\#assert-see-link)

Assert that the given link is present on the page:

```torchlight

$browser->assertSeeLink($linkText);
```

#### [assertDontSeeLink](\#assert-dont-see-link)

Assert that the given link is not present on the page:

```torchlight

$browser->assertDontSeeLink($linkText);
```

#### [assertInputValue](\#assert-input-value)

Assert that the given input field has the given value:

```torchlight

$browser->assertInputValue($field, $value);
```

#### [assertInputValueIsNot](\#assert-input-value-is-not)

Assert that the given input field does not have the given value:

```torchlight

$browser->assertInputValueIsNot($field, $value);
```

#### [assertChecked](\#assert-checked)

Assert that the given checkbox is checked:

```torchlight

$browser->assertChecked($field);
```

#### [assertNotChecked](\#assert-not-checked)

Assert that the given checkbox is not checked:

```torchlight

$browser->assertNotChecked($field);
```

#### [assertRadioSelected](\#assert-radio-selected)

Assert that the given radio field is selected:

```torchlight

$browser->assertRadioSelected($field, $value);
```

#### [assertRadioNotSelected](\#assert-radio-not-selected)

Assert that the given radio field is not selected:

```torchlight

$browser->assertRadioNotSelected($field, $value);
```

#### [assertSelected](\#assert-selected)

Assert that the given dropdown has the given value selected:

```torchlight

$browser->assertSelected($field, $value);
```

#### [assertNotSelected](\#assert-not-selected)

Assert that the given dropdown does not have the given value selected:

```torchlight

$browser->assertNotSelected($field, $value);
```

#### [assertSelectHasOptions](\#assert-select-has-options)

Assert that the given array of values are available to be selected:

```torchlight

$browser->assertSelectHasOptions($field, $values);
```

#### [assertSelectMissingOptions](\#assert-select-missing-options)

Assert that the given array of values are not available to be selected:

```torchlight

$browser->assertSelectMissingOptions($field, $values);
```

#### [assertSelectHasOption](\#assert-select-has-option)

Assert that the given value is available to be selected on the given field:

```torchlight

$browser->assertSelectHasOption($field, $value);
```

#### [assertSelectMissingOption](\#assert-select-missing-option)

Assert that the given value is not available to be selected:

```torchlight

$browser->assertSelectMissingOption($field, $value);
```

#### [assertValue](\#assert-value)

Assert that the element matching the given selector has the given value:

```torchlight

$browser->assertValue($selector, $value);
```

#### [assertValueIsNot](\#assert-value-is-not)

Assert that the element matching the given selector does not have the given value:

```torchlight

$browser->assertValueIsNot($selector, $value);
```

#### [assertAttribute](\#assert-attribute)

Assert that the element matching the given selector has the given value in the provided attribute:

```torchlight

$browser->assertAttribute($selector, $attribute, $value);
```

#### [assertAttributeContains](\#assert-attribute-contains)

Assert that the element matching the given selector contains the given value in the provided attribute:

```torchlight

$browser->assertAttributeContains($selector, $attribute, $value);
```

#### [assertAriaAttribute](\#assert-aria-attribute)

Assert that the element matching the given selector has the given value in the provided aria attribute:

```torchlight

$browser->assertAriaAttribute($selector, $attribute, $value);
```

For example, given the markup `<button aria-label="Add"></button>`, you may assert against the `aria-label` attribute like so:

```torchlight

$browser->assertAriaAttribute('button', 'label', 'Add')
```

#### [assertDataAttribute](\#assert-data-attribute)

Assert that the element matching the given selector has the given value in the provided data attribute:

```torchlight

$browser->assertDataAttribute($selector, $attribute, $value);
```

For example, given the markup `<tr id="row-1" data-content="attendees"></tr>`, you may assert against the `data-label` attribute like so:

```torchlight

$browser->assertDataAttribute('#row-1', 'content', 'attendees')
```

#### [assertVisible](\#assert-visible)

Assert that the element matching the given selector is visible:

```torchlight

$browser->assertVisible($selector);
```

#### [assertPresent](\#assert-present)

Assert that the element matching the given selector is present in the source:

```torchlight

$browser->assertPresent($selector);
```

#### [assertNotPresent](\#assert-not-present)

Assert that the element matching the given selector is not present in the source:

```torchlight

$browser->assertNotPresent($selector);
```

#### [assertMissing](\#assert-missing)

Assert that the element matching the given selector is not visible:

```torchlight

$browser->assertMissing($selector);
```

#### [assertInputPresent](\#assert-input-present)

Assert that an input with the given name is present:

```torchlight

$browser->assertInputPresent($name);
```

#### [assertInputMissing](\#assert-input-missing)

Assert that an input with the given name is not present in the source:

```torchlight

$browser->assertInputMissing($name);
```

#### [assertDialogOpened](\#assert-dialog-opened)

Assert that a JavaScript dialog with the given message has been opened:

```torchlight

$browser->assertDialogOpened($message);
```

#### [assertEnabled](\#assert-enabled)

Assert that the given field is enabled:

```torchlight

$browser->assertEnabled($field);
```

#### [assertDisabled](\#assert-disabled)

Assert that the given field is disabled:

```torchlight

$browser->assertDisabled($field);
```

#### [assertButtonEnabled](\#assert-button-enabled)

Assert that the given button is enabled:

```torchlight

$browser->assertButtonEnabled($button);
```

#### [assertButtonDisabled](\#assert-button-disabled)

Assert that the given button is disabled:

```torchlight

$browser->assertButtonDisabled($button);
```

#### [assertFocused](\#assert-focused)

Assert that the given field is focused:

```torchlight

$browser->assertFocused($field);
```

#### [assertNotFocused](\#assert-not-focused)

Assert that the given field is not focused:

```torchlight

$browser->assertNotFocused($field);
```

#### [assertAuthenticated](\#assert-authenticated)

Assert that the user is authenticated:

```torchlight

$browser->assertAuthenticated();
```

#### [assertGuest](\#assert-guest)

Assert that the user is not authenticated:

```torchlight

$browser->assertGuest();
```

#### [assertAuthenticatedAs](\#assert-authenticated-as)

Assert that the user is authenticated as the given user:

```torchlight

$browser->assertAuthenticatedAs($user);
```

#### [assertVue](\#assert-vue)

Dusk even allows you to make assertions on the state of [Vue component](https://vuejs.org) data. For example, imagine your application contains the following Vue component:

```torchlight

// HTML...

<profile dusk="profile-component"></profile>

// Component Definition...

Vue.component('profile', {
    template: '<div>{{ user.name }}</div>',

    data: function () {
        return {
            user: {
                name: 'Taylor'
            }
        };
    }
});
```

You may assert on the state of the Vue component like so:

```torchlight

/**
 * A basic Vue test example.
 *
 * @return void
 */
public function testVue()
{
    $this->browse(function (Browser $browser) {
        $browser->visit('/')
                ->assertVue('user.name', 'Taylor', '@profile-component');
    });
}
```

#### [assertVueIsNot](\#assert-vue-is-not)

Assert that a given Vue component data property does not match the given value:

```torchlight

$browser->assertVueIsNot($property, $value, $componentSelector = null);
```

#### [assertVueContains](\#assert-vue-contains)

Assert that a given Vue component data property is an array and contains the given value:

```torchlight

$browser->assertVueContains($property, $value, $componentSelector = null);
```

#### [assertVueDoesNotContain](\#assert-vue-does-not-contain)

Assert that a given Vue component data property is an array and does not contain the given value:

```torchlight

$browser->assertVueDoesNotContain($property, $value, $componentSelector = null);
```

## [Pages](\#pages)

Sometimes, tests require several complicated actions to be performed in sequence. This can make your tests harder to read and understand. Dusk Pages allow you to define expressive actions that may then be performed on a given page via a single method. Pages also allow you to define short-cuts to common selectors for your application or for a single page.

### [Generating Pages](\#generating-pages)

To generate a page object, execute the `dusk:page` Artisan command. All page objects will be placed in your application's `tests/Browser/Pages` directory:

```torchlight

php artisan dusk:page Login
```

### [Configuring Pages](\#configuring-pages)

By default, pages have three methods: `url`, `assert`, and `elements`. We will discuss the `url` and `assert` methods now. The `elements` method will be [discussed in more detail below](#shorthand-selectors).

#### [The `url` Method](\#the-url-method)

The `url` method should return the path of the URL that represents the page. Dusk will use this URL when navigating to the page in the browser:

```torchlight

/**
 * Get the URL for the page.
 *
 * @return string
 */
public function url()
{
    return '/login';
}
```

#### [The `assert` Method](\#the-assert-method)

The `assert` method may make any assertions necessary to verify that the browser is actually on the given page. It is not actually necessary to place anything within this method; however, you are free to make these assertions if you wish. These assertions will be run automatically when navigating to the page:

```torchlight

/**
 * Assert that the browser is on the page.
 *
 * @return void
 */
public function assert(Browser $browser)
{
    $browser->assertPathIs($this->url());
}
```

### [Navigating To Pages](\#navigating-to-pages)

Once a page has been defined, you may navigate to it using the `visit` method:

```torchlight

use Tests\Browser\Pages\Login;

$browser->visit(new Login);
```

Sometimes you may already be on a given page and need to "load" the page's selectors and methods into the current test context. This is common when pressing a button and being redirected to a given page without explicitly navigating to it. In this situation, you may use the `on` method to load the page:

```torchlight

use Tests\Browser\Pages\CreatePlaylist;

$browser->visit('/dashboard')
        ->clickLink('Create Playlist')
        ->on(new CreatePlaylist)
        ->assertSee('@create');
```

### [Shorthand Selectors](\#shorthand-selectors)

The `elements` method within page classes allows you to define quick, easy-to-remember shortcuts for any CSS selector on your page. For example, let's define a shortcut for the "email" input field of the application's login page:

```torchlight

/**
 * Get the element shortcuts for the page.
 *
 * @return array
 */
public function elements()
{
    return [
        '@email' => 'input[name=email]',
    ];
}
```

Once the shortcut has been defined, you may use the shorthand selector anywhere you would typically use a full CSS selector:

```torchlight

$browser->type('@email', '[email protected]');
```

#### [Global Shorthand Selectors](\#global-shorthand-selectors)

After installing Dusk, a base `Page` class will be placed in your `tests/Browser/Pages` directory. This class contains a `siteElements` method which may be used to define global shorthand selectors that should be available on every page throughout your application:

```torchlight

/**
 * Get the global element shortcuts for the site.
 *
 * @return array
 */
public static function siteElements()
{
    return [
        '@element' => '#selector',
    ];
}
```

### [Page Methods](\#page-methods)

In addition to the default methods defined on pages, you may define additional methods which may be used throughout your tests. For example, let's imagine we are building a music management application. A common action for one page of the application might be to create a playlist. Instead of re-writing the logic to create a playlist in each test, you may define a `createPlaylist` method on a page class:

```torchlight

<?php

namespace Tests\Browser\Pages;

use Laravel\Dusk\Browser;

class Dashboard extends Page
{
    // Other page methods...

    /**
     * Create a new playlist.
     *
     * @param  \Laravel\Dusk\Browser  $browser
     * @param  string  $name
     * @return void
     */
    public function createPlaylist(Browser $browser, $name)
    {
        $browser->type('name', $name)
                ->check('share')
                ->press('Create Playlist');
    }
}
```

Once the method has been defined, you may use it within any test that utilizes the page. The browser instance will automatically be passed as the first argument to custom page methods:

```torchlight

use Tests\Browser\Pages\Dashboard;

$browser->visit(new Dashboard)
        ->createPlaylist('My Playlist')
        ->assertSee('My Playlist');
```

## [Components](\#components)

Components are similar to Dusk’s “page objects”, but are intended for pieces of UI and functionality that are re-used throughout your application, such as a navigation bar or notification window. As such, components are not bound to specific URLs.

### [Generating Components](\#generating-components)

To generate a component, execute the `dusk:component` Artisan command. New components are placed in the `tests/Browser/Components` directory:

```torchlight

php artisan dusk:component DatePicker
```

As shown above, a "date picker" is an example of a component that might exist throughout your application on a variety of pages. It can become cumbersome to manually write the browser automation logic to select a date in dozens of tests throughout your test suite. Instead, we can define a Dusk component to represent the date picker, allowing us to encapsulate that logic within the component:

```torchlight

<?php

namespace Tests\Browser\Components;

use Laravel\Dusk\Browser;
use Laravel\Dusk\Component as BaseComponent;

class DatePicker extends BaseComponent
{
    /**
     * Get the root selector for the component.
     *
     * @return string
     */
    public function selector()
    {
        return '.date-picker';
    }

    /**
     * Assert that the browser page contains the component.
     *
     * @param  Browser  $browser
     * @return void
     */
    public function assert(Browser $browser)
    {
        $browser->assertVisible($this->selector());
    }

    /**
     * Get the element shortcuts for the component.
     *
     * @return array
     */
    public function elements()
    {
        return [
            '@date-field' => 'input.datepicker-input',
            '@year-list' => 'div > div.datepicker-years',
            '@month-list' => 'div > div.datepicker-months',
            '@day-list' => 'div > div.datepicker-days',
        ];
    }

    /**
     * Select the given date.
     *
     * @param  \Laravel\Dusk\Browser  $browser
     * @param  int  $year
     * @param  int  $month
     * @param  int  $day
     * @return void
     */
    public function selectDate(Browser $browser, $year, $month, $day)
    {
        $browser->click('@date-field')
                ->within('@year-list', function ($browser) use ($year) {
                    $browser->click($year);
                })
                ->within('@month-list', function ($browser) use ($month) {
                    $browser->click($month);
                })
                ->within('@day-list', function ($browser) use ($day) {
                    $browser->click($day);
                });
    }
}
```

### [Using Components](\#using-components)

Once the component has been defined, we can easily select a date within the date picker from any test. And, if the logic necessary to select a date changes, we only need to update the component:

```torchlight

<?php

namespace Tests\Browser;

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\Dusk\Browser;
use Tests\Browser\Components\DatePicker;
use Tests\DuskTestCase;

class ExampleTest extends DuskTestCase
{
    /**
     * A basic component test example.
     *
     * @return void
     */
    public function testBasicExample()
    {
        $this->browse(function (Browser $browser) {
            $browser->visit('/')
                    ->within(new DatePicker, function ($browser) {
                        $browser->selectDate(2019, 1, 30);
                    })
                    ->assertSee('January');
        });
    }
}
```

## [Continuous Integration](\#continuous-integration)

exclamation

Most Dusk continuous integration configurations expect your Laravel application to be served using the built-in PHP development server on port 8000. Therefore, before continuing, you should ensure that your continuous integration environment has an `APP_URL` environment variable value of `http://127.0.0.1:8000`.

### [Heroku CI](\#running-tests-on-heroku-ci)

To run Dusk tests on [Heroku CI](https://www.heroku.com/continuous-integration), add the following Google Chrome buildpack and scripts to your Heroku `app.json` file:

```torchlight

{
  "environments": {
    "test": {
      "buildpacks": [
        { "url": "heroku/php" },
        { "url": "https://github.com/heroku/heroku-buildpack-google-chrome" }
      ],
      "scripts": {
        "test-setup": "cp .env.testing .env",
        "test": "nohup bash -c './vendor/laravel/dusk/bin/chromedriver-linux > /dev/null 2>&1 &' && nohup bash -c 'php artisan serve --no-reload > /dev/null 2>&1 &' && php artisan dusk"
      }
    }
  }
}
```

### [Travis CI](\#running-tests-on-travis-ci)

To run your Dusk tests on [Travis CI](https://travis-ci.org), use the following `.travis.yml` configuration. Since Travis CI is not a graphical environment, we will need to take some extra steps in order to launch a Chrome browser. In addition, we will use `php artisan serve` to launch PHP's built-in web server:

```torchlight

language: php

php:
  - 7.3

addons:
  chrome: stable

install:
  - cp .env.testing .env
  - travis_retry composer install --no-interaction --prefer-dist
  - php artisan key:generate
  - php artisan dusk:chrome-driver

before_script:
  - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
  - php artisan serve --no-reload &

script:
  - php artisan dusk
```

### [GitHub Actions](\#running-tests-on-github-actions)

If you are using [Github Actions](https://github.com/features/actions) to run your Dusk tests, you may use the following configuration file as a starting point. Like TravisCI, we will use the `php artisan serve` command to launch PHP's built-in web server:

```torchlight

name: CI
on: [push]
jobs:

  dusk-php:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Prepare The Environment
        run: cp .env.example .env
      - name: Create Database
        run: |
          sudo systemctl start mysql
          mysql --user="root" --password="root" -e "CREATE DATABASE 'my-database' character set UTF8mb4 collate utf8mb4_bin;"
      - name: Install Composer Dependencies
        run: composer install --no-progress --prefer-dist --optimize-autoloader
      - name: Generate Application Key
        run: php artisan key:generate
      - name: Upgrade Chrome Driver
        run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
      - name: Start Chrome Driver
        run: ./vendor/laravel/dusk/bin/chromedriver-linux &
      - name: Run Laravel Server
        run: php artisan serve --no-reload &
      - name: Run Dusk Tests
        env:
          APP_URL: "http://127.0.0.1:8000"
        run: php artisan dusk
      - name: Upload Screenshots
        if: failure()
        uses: actions/upload-artifact@v2
        with:
          name: screenshots
          path: tests/Browser/screenshots
      - name: Upload Console Logs
        if: failure()
        uses: actions/upload-artifact@v2
        with:
          name: console
          path: tests/Browser/console
```

[![Laravel](/img/logomark.min.svg)](/)

Laravel is a web application framework with expressive, elegant syntax. We believe development must
be an enjoyable and creative experience to be truly fulfilling. Laravel attempts to take the pain
out of development by easing common tasks used in most web projects.

- [![X](/img/social/x.dark.min.svg)![X](/img/social/x.min.svg)](https://x.com/laravelphp)
- [![GitHub](/img/social/github.dark.min.svg)![GitHub](/img/social/github.min.svg)](https://github.com/laravel)
- [![Discord](/img/social/discord.dark.min.svg)![Discord](/img/social/discord.min.svg)](https://discord.gg/laravel)
- [![YouTube](/img/social/youtube.dark.min.svg)![YouTube](/img/social/youtube.min.svg)](https://www.youtube.com/laravelphp)

Highlights

- [Release Notes](/docs/11.x/releases)
- [Getting Started](/docs/11.x/installation)
- [Routing](/docs/11.x/routing)
- [Blade Templates](/docs/11.x/blade)
- [Authentication](/docs/11.x/authentication)
- [Authorization](/docs/11.x/authorization)
- [Artisan Console](/docs/11.x/artisan)
- [Database](/docs/11.x/database)
- [Eloquent ORM](/docs/11.x/eloquent)
- [Testing](/docs/11.x/testing)

Resources

- [Laravel Bootcamp](https://bootcamp.laravel.com)
- [Laracasts](https://laracasts.com)
- [Laravel News](https://laravel-news.com)
- [Laracon](https://laracon.us)
- [Laracon AU](https://laracon.au)
- [Laracon EU](https://laracon.eu/)
- [Laracon India](https://laracon.in/)
- [Larabelles](https://larabelles.com/)
- [Careers](https://laravel.com/careers)
- [Jobs](https://larajobs.com/?partner=5)
- [Forums](https://laracasts.com/discuss)
- [Trademark](/trademark)

Partners

- [Vehikl](https://vehikl.com)
- [WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=laravel.com&utm_campaign=footer-link)
- [Tighten](https://tighten.co)
- [Bacancy](https://www.bacancytechnology.com/hire-laravel-developer?utm_source=laravel&utm_medium=partners.laravel&utm_campaign=sponsors)
- [64 Robots](https://64robots.com/)
- [Active Logic](https://activelogic.com/)
- [Black Airplane](https://www.blackairplane.com/)
- [Byte 5](https://www.byte5.net/)
- [Curotec](https://www.curotec.com/services/technologies/laravel/)
- [Cyber-Duck](https://www.cyber-duck.co.uk/how-we-work/technology/laravel?utm_source=Laravel%20Partner&utm_medium=Sponsorship)
- [DevSquad](https://devsquad.com/)
- [Jump24](https://jump24.co.uk/)
- [Kirschbaum](https://kirschbaumdevelopment.com/)

Ecosystem

- [Breeze](/docs/11.x/starter-kits#laravel-breeze)
- [Cashier](/docs/11.x/billing)
- [Dusk](/docs/11.x/dusk)
- [Echo](/docs/11.x/broadcasting)
- [Envoyer](https://envoyer.io)
- [Forge](https://forge.laravel.com)
- [Herd](https://herd.laravel.com)
- [Horizon](/docs/11.x/horizon)
- [Inertia](https://inertiajs.com)
- [Jetstream](https://jetstream.laravel.com)
- [Livewire](https://livewire.laravel.com)
- [Nova](https://nova.laravel.com)
- [Octane](/docs/11.x/octane)
- [Pennant](/docs/11.x/pennant)
- [Pint](/docs/11.x/pint)
- [Prompts](/docs/11.x/prompts)
- [Pulse](https://pulse.laravel.com)
- [Reverb](https://reverb.laravel.com)
- [Sail](/docs/11.x/sail)
- [Sanctum](/docs/11.x/sanctum)
- [Scout](/docs/11.x/scout)
- [Socialite](/docs/11.x/socialite)
- [Spark](https://spark.laravel.com)
- [Telescope](/docs/11.x/telescope)
- [Vapor](https://vapor.laravel.com)

Laravel is a Trademark of Laravel Holdings Inc.

Copyright © 2011-2024 Laravel Holdings Inc.


Code highlighting provided by [Torchlight](https://torchlight.dev)