Your test clicks Delete. A confirmation box appears asking "Are you sure?". Your next line looks for the updated table and fails with a message about the element not being found, or about an unexpected alert being open.
The dialog is not part of the page. It is drawn by the browser, outside the DOM. No CSS selector can reach it, and while it is open the page underneath is frozen.
Three kinds exist, and they behave differently:
alert shows a message with one OK button.
confirm asks a question with OK and Cancel. Your choice changes what the app does, so both paths are worth testing.