Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Subtype PlaywrightException in the case of failing assertions #2940

Open
RenderMichael opened this issue May 25, 2024 · 0 comments

Comments

@RenderMichael
Copy link
Contributor

RenderMichael commented May 25, 2024

🚀 Feature Request

Playwright exceptions that come from Expects would be be subtyped.

public sealed class PlaywrightAssertionException : PlaywrightException
{
    public PlaywrightAssertionException()
    {
    }

    public PlaywrightAssertionException(string message) : base(message)
    {
    }

    public PlaywrightAssertionException(string message, Exception innerException) : base(message, innerException)
    {
    }

Example

No response

Motivation

I am following the guidance of `Expect'- first assertions and migrating away from NUnit assertions in the process. However, it was useful to me to know when a test failed because of an assertion exception, or when the test was was improperly crafted.

I am happy to implement this feature myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants