Created
December 11, 2022 02:07
-
-
Save SeidChr/2090bae56b140a4baeff3c02f2caf6e8 to your computer and use it in GitHub Desktop.
Playwright with XUnit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace playwrighttests; | |
// <PackageReference Include="PlaywrightSharp" Version="0.192.0" /> | |
public class UnitTest1 | |
{ | |
[Fact] | |
public async void Test1() | |
{ | |
var pw = await PlaywrightSharp.Playwright.CreateAsync(); | |
var br = await pw.Chromium.LaunchAsync(); | |
var pg = await br.NewPageAsync(); | |
await pg.GoToAsync("https://www.google.de"); | |
var html = await pg.GetInnerHtmlAsync("*"); | |
Assert.False(string.IsNullOrWhiteSpace(html)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment