Files
Beam/Beam.Playwright/PlaywrightContext.cs
T
qwsdcvghyu89 a7d148a96f Introduce Beam.Fluent and Beam.Models projects
Added new Beam.Fluent and Beam.Models projects with staged download builder and data context models. Refactored and moved model classes from Beam.Temporary.Cli to Beam.Models. Added new data providers and extended DataBindings in Beam.Dynamic. Renamed Beam.Puppeteer to Beam.Playwright and updated related classes. Updated project references and package versions. Removed obsolete and unused files from Beam.Temporary.Cli.
2025-09-18 18:32:25 +10:00

21 lines
624 B
C#

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