cancel
Showing results for 
Search instead for 
Did you mean: 

Integration Testing on a Blazor Front End

What are people using for integration testing for a Blazor app?

I wanted to do the testing with Playwright, but I'm more of a JS guy, so jumping straight into Playwright in C# proved a bit difficult for me. I decided to just go with Selenium in C# using xUnit, as that's what the devs are using for unit tests.

I've been writing tests in an xunit Selenium framework and I am getting killed by stale element errors. There are times when I have a wait until an element is visible, followed by a wait for element to be clickable, then finally the click method, only to get a stale element error. I even tried to set up a retry method, but it only retries if the assertion fails, not if an exception is thrown at some other point in the test.

Is this a problem inherent to Blazor apps or are we just doing something wrong here?

AkinBredailik
Member
0 REPLIES 0