mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
Catch errors in AssertNoErrors
This commit is contained in:
parent
f58043b07f
commit
9d2d2d0d64
1 changed files with 11 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Tests.Logging;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using OpenQA.Selenium;
|
||||
using Xunit;
|
||||
|
@ -19,15 +20,21 @@ namespace BTCPayServer.Tests
|
|||
catch
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.AppendLine();
|
||||
foreach (var logKind in new []{ LogType.Browser, LogType.Client, LogType.Driver })
|
||||
{
|
||||
builder.AppendLine($"Selenium [{logKind}]:");
|
||||
foreach (var entry in driver.Manage().Logs.GetLog(logKind))
|
||||
try
|
||||
{
|
||||
builder.AppendLine($"[{entry.Level}]: {entry.Message}");
|
||||
builder.AppendLine($"Selenium [{logKind}]:");
|
||||
foreach (var entry in driver.Manage().Logs.GetLog(logKind))
|
||||
{
|
||||
builder.AppendLine($"[{entry.Level}]: {entry.Message}");
|
||||
}
|
||||
builder.AppendLine($"---------");
|
||||
}
|
||||
builder.AppendLine($"---------");
|
||||
catch { }
|
||||
}
|
||||
Logs.Tester.LogInformation(builder.ToString());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue