// 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 Templates.Test.Infrastructure { [CaptureSeleniumLogs] public class BrowserTestBase : TemplateTestBase, IClassFixture { private static readonly AsyncLocal _browser = new AsyncLocal(); private static readonly AsyncLocal _logs = new AsyncLocal(); public static IWebDriver Browser => _browser.Value; public static ILogs Logs => _logs.Value; public BrowserTestBase(BrowserFixture browserFixture, ITestOutputHelper output) : base(output) { _browser.Value = browserFixture.Browser; _logs.Value = browserFixture.Logs; } } }