// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading; using OpenQA.Selenium; using Xunit; using Xunit.Abstractions; namespace Microsoft.AspNetCore.E2ETesting { [CaptureSeleniumLogs] public class BrowserTestBase : IClassFixture { private static readonly AsyncLocal _browser = new AsyncLocal(); private static readonly AsyncLocal _logs = new AsyncLocal(); private static readonly AsyncLocal _output = new AsyncLocal(); public static IWebDriver Browser => _browser.Value; public static ILogs Logs => _logs.Value; public static ITestOutputHelper Output => _output.Value; public BrowserTestBase(BrowserFixture browserFixture, ITestOutputHelper output) { _browser.Value = browserFixture.Browser; _logs.Value = browserFixture.Logs; _output.Value = output; } } }