[Vuejs]-Use a custom Laravel Dusk selector attribute (data-dusk)

1👍

Unfortunately this doesn’t seem to be documented anywhere, but you can change the the attribute that Dusk looks for by adding this to the boot() method of your app/Providers/AppServiceProvider.php file.

<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        // ...

        \Laravel\Dusk\Dusk::selectorHtmlAttribute('data-dusk');
    }
}

Taylor added this in this commit: https://github.com/laravel/dusk/commit/cf04717664f80204567ad3077ea7484a0be16497

Leave a comment