I would try something like this
Text::make('Name')
->withMeta([
'extraAttributes' => [
'dusk' => 'name',
]
])
Then you can use dusk selectors
$browser->type('@name', 'Giorgiovski');
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
In my Nova project, I have auto-generated elements with "data-v-111112" div names. I want to use Dusk for testing from the browser but I don't know how to pass to tests their auto-generated names. Is there a way to do that?
Thank you.
I would try something like this
Text::make('Name')
->withMeta([
'extraAttributes' => [
'dusk' => 'name',
]
])
Then you can use dusk selectors
$browser->type('@name', 'Giorgiovski');
Please or to participate in this conversation.