Press a button that asks first, and confirm: the library's question is a dialog with no name of its own, found by its role and its text ("Are you sure…"), and answered with its "Confirm". The step waits until the dialog closes.
Examples
When I confirm "Empty trash"
When we confirm "Restore all"
And I confirm "Delete album"
When I confirm "Empty trash"
Then we confirm "Restore all"
Pattern
When(/^(?:I|we) confirm "([^"]+)"$/, …)
Part of @webship-js/immich-steps (github.com/webship/immich-steps), a step pack for Webship-js 2.0.x.