laravel-dusk

Automate Laravel browser tests with Dusk selectors and the Browser API.

40|7|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel-dusk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-dusk
Source: https://github.com/rawveg/skillsforge-marketplace/tree/main/laravel-dusk
Command: npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel-dusk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write, debug, and maintain expressive Laravel Dusk browser tests for UI automation and end-to-end testing.

Core Features & Use Cases

  • Dusk Basics: Write tests with the Browser API and Dusk selectors.
  • Cross-Browser Testing: Manage multiple browser sessions and waits.
  • Page Objects & Macros: Organize tests using Page Objects and reusable macros.

Quick Start

Install Laravel Dusk and run php artisan dusk to start testing with a basic login test.

Frequently Asked Questions about laravel-dusk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write end-to-end tests for Laravel applications?

End-to-end testing for Laravel uses Dusk, which automates browser interactions via the Browser API. Write tests that simulate user actions like form submissions, authentication, and JavaScript interactions, then run them with php artisan dusk to verify UI workflows function correctly.

Can I use Laravel Dusk for cross-browser testing?

Yes, Dusk supports multiple browser drivers including ChromeDriver and alternatives. Manage separate browser sessions and configure wait strategies to test your application across different browsers and ensure consistent behavior.

What's the best way to organize and reuse browser tests in Laravel?

Use Page Objects and browser macros to organize tests and reduce duplication. Page Objects encapsulate selectors and actions for specific pages; macros bundle reusable test sequences, making test suites more maintainable and expressive.

Do I need Selenium to use Laravel Dusk for browser testing?

Dusk abstracts driver management and works with ChromeDriver by default, but Selenium WebDriver is the underlying protocol. You don't configure Selenium directly; Dusk handles driver setup when you run php artisan dusk.

How do I test JavaScript-driven interactions and asynchronous behavior in Laravel?

Dusk provides JavaScript execution capabilities and configurable wait strategies to handle async operations. Execute JavaScript directly, wait for DOM elements with intelligent retries, and test interactions that depend on client-side state changes.

Can I automate form submissions and authentication flows with browser testing?

Yes, Dusk's Browser API lets you fill forms, click buttons, and verify redirects. Combine selectors, input actions, and assertion methods to automate login sequences, multi-step workflows, and form validation across your Laravel app.