madbob / dusk-utils
A few utilities for unit testing with Laravel Dusk.
Installs: 536
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Forks: 0
pkg:composer/madbob/dusk-utils
Requires
- laravel/dusk: ^6.0
This package is auto-updated.
Last update: 2025-10-14 17:28:19 UTC
README
A few utilities for unit testing with Laravel Dusk.
typeAtXPath($expression, $value): similar to the nativetypebut uses a XPath expression as targetassertInputValueAtXPath($expression, $value): similar to the nativeassertInputValuebut uses a XPath expression as targetassertSeeAtXPath($expression, $value): similar to the nativeassertSeebut uses a XPath expression as targetscrollView($selector): similar to the nativescrollIntoViewbut scrolls the element at the end of the viewport, not the beginningscrollTop(): scrolls the viewport to the topscrollBottom(): scrolls the viewport to the bottommainScreenshot($filename): similar to the nativescreenshotbut scrolls the viewport to the top before taking the shot
Installation
composer require madbob/dusk-utils
Then in the boot() function of your preferred Service Provided (AppServiceProvider?) add the line
\MadBob\DuskUtils\Utils::init();
to init the extra macros.