I guess this is a classic C# to F# conversion I haven't quite got my head around.
I am trying to automate a browser using the quick start
https://playwright.dev/dotnet/docs/intro
The C# code is
using var playwright = await Playwright.CreateAsync();
await using var browser = await playwright.Chromium.LaunchAsync();
var page = await browser.NewPageAsync();
await page.GotoAsync("http://www.bing.com");
await page.ScreenshotAsync(path: outputFile);
I've made a start but getting a bit lost already.
let playwright: Playwright = PlaywrightSharp.Playwright.CreateAsync() |> Async.AwaitTask
Incorrect type. What am I doing wrong here?
Error FS0001 This expression was expected to have type
'Playwright'
but here has type
'Async<IPlaywright>'