playwright-dotnet icon indicating copy to clipboard operation
playwright-dotnet copied to clipboard

[Feature] Implement Custom Expect Message option

Open konarx opened this issue 2 years ago • 4 comments

It would be nice and useful to have Custom Message on Assertion Error e.g.

var locator = Page.Locator(".my-element");
await Expect(locator, "My Element is not visible!").ToBeVisibleAsync();

This feature is already implemented in Node.js (see Custom Expect Message) so I believe it's quite straightforward and clear what its purpose is.

konarx avatar May 30 '22 10:05 konarx

Would very much like this.

Darkle avatar Aug 04 '23 06:08 Darkle

can we please have this, we have to use Fluent assertion library to get that, it would be great if we can add this, it can avoid some print statements as well

gauravkhuraana avatar Feb 22 '24 12:02 gauravkhuraana