microsoft / microsoft/playwright-dotnet
[Feature]: Subtype `PlaywrightException` in the case of failing assertions
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3k
- Forks
- 304
- Avg merge
- 20h 47m
- Merged PRs (30d)
- 6
Description
🚀 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin at the .NET Expect assertion implementation, locating where assertion failures currently throw PlaywrightException, and inspect nearby tests. Use the proposed PlaywrightAssertionException constructors as the API reference. Done means failing Expect assertions expose the subtype while the existing exception behavior remains covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100