Skip to content
Discussion options

You must be logged in to vote

Hi, @Toliar
This happens because [AllureStep] tries to serialize the arguments. By default, it tries to convert the value to JSON. In your case this fails badly as Playwright locators aren't JSON-friendly. While there is room for improvement on our side (see allure-framework/allure-csharp#482 and allure-framework/allure-csharp#502), there are some workarounds that may help.

The easiest workaround is to ignore the locator argument with [Allure.NUnit.Attributes.Skip]:

[AllureStep("Check tab is active")]
public async Task CheckTabIsActiveAsync([Allure.NUnit.Attributes.Skip] ILocator locator)
{
    await Assertions.Expect(locator).ToHaveClassAsync(new Regex("active"));
}

If you prefer keeping…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Toliar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants