I got exception when tried Selenium Integration test.
OpenQA.Selenium.WebDriverException
unknown error: net::ERR_CONNECTION_REFUSED
(Session info: headless MicrosoftEdge=108.0.1462.54)
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.set_Url(String value)
at OpenQA.Selenium.Navigator.GoToUrl(String url)
at Brushtail.AspNetCore.Blazor.Pages.IndexTests.HomePageTest() in D:\Projects\Brushtail-Extensions\Brushtail.Extensions\Brushtail.AspNetCore\Brushtail.AspNetCore.Blazor\Pages\Index.Tests.cs:line 17
But HttpClient returns the status code 200
var result = await Client.GetAsync("/");
result.IsSuccessStatusCode.ShouldBe(true);
Major I am using Blazor .NET 7, so I can't use old Startup. I am testing on real db server. Because In Memory database doesn't supports the NetTopologySuite.
new WebApplicationFactory<Program>()