Laravel Dusk Javascript Confirm()

Jennifer Zhou

In my form, in order to submit, I need to press the OK button in a Javascript confirm() popup. How can I confirm in Laravel Dusk so that I can automate the submission of the form for testing purposes?

Image of the Confirm

XXLIVE
$browser->dismissDialog() = press Cancel (if confirmation)
$browser->acceptDialog() = press OK
$browser->assertDialogOpened('Text in dialog'); = check dialog exist with text specified.

Good luck

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related