How do I Accept a Dialog like the one below using Playwright Sharp?
I can't seem to find anything in Playwright Sharp's documentation, however Playwright's (JS) documentation describes how to add an event handler for a dialog:
page.on('dialog', dialog => dialog.accept());
Is there a similar way to do this in Playwright Sharp?
page.Dialog triggers dialog events when they appear, it's just a matter of registering an event handler to it as below:
page.Dialog += (_, x) => x.Dialog.AcceptAsync();