1

I have following flash message generated on my page

flash('Success message')->success();

Trying to assert through

->assertSee('Success message');

With no luck

<div class="alert
                    alert-success
                    " role="alert">              
            Success message
        </div>

I will always get

Did not see expected text [Success message] within element [body].
Failed asserting that false is true.

Despite the fact the message is in the body

What am I doing wrong?

Thanks

Vojta
  • 379
  • 1
  • 4
  • 15

1 Answers1

2

If you are using alert

Use:$browser->assertDialogOpened('Success message');

manikandan
  • 21
  • 3