using Microsoft.Playwright; namespace Beam.Puppeteer { public delegate Task AsyncManipulator(IPage page); public static class PuppetContext { public static Lazy Playwright { get; set; } public static Lazy Browser { get; set; } //public static Task OpenBrowser() { //} static PuppetContext() { Playwright = new Lazy(() => Microsoft.Playwright.Playwright.CreateAsync().Result); Browser = new Lazy(() => Playwright.Value.Chromium.LaunchAsync().Result); } } }