Skip to content

Commit

Permalink
headless?
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Mar 25, 2024
1 parent d006d47 commit be0fe73
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sample/Yapoml.Playwright.Sample/Basics/NuGetSearchTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class NuGetSearchTest
public async Task SetUp()
{
_playwright = await Microsoft.Playwright.Playwright.CreateAsync();
_browser = await _playwright.Chromium.LaunchAsync(new() { Headless = false });
_browser = await _playwright.Chromium.LaunchAsync(new() { Headless = true });
_page = await _browser.NewPageAsync();

await _page.GotoAsync("https://nuget.org");
Expand Down
6 changes: 0 additions & 6 deletions sample/Yapoml.Playwright.Sample/NuGetSearchTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ public class NuGetSearchTest
private IBrowser _browser;
private IPlaywright _playwright;

[OneTimeSetUp]
public void DownloadPlaywright()
{
Program.Main(new string[] { "install" });
}

[SetUp]
public async Task SetUp()
{
Expand Down
2 changes: 1 addition & 1 deletion sample/Yapoml.Playwright.Sample/SwagLabs/SwagLabsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class SwagLabsTests
public async Task SetUp()
{
_playwright = await Microsoft.Playwright.Playwright.CreateAsync();
var browser = await _playwright.Chromium.LaunchAsync(new() { Headless = false });
var browser = await _playwright.Chromium.LaunchAsync(new() { Headless = true });
var page = await browser.NewPageAsync();

_ya = page.Ya(opts => opts.WithBaseUrl("https://www.saucedemo.com")).SwagLabs.Pages;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void DownloadPlaywright()
public async Task SetUp()
{
_playwright = await Microsoft.Playwright.Playwright.CreateAsync();
_browser = await _playwright.Chromium.LaunchAsync(new() { Headless = false });
_browser = await _playwright.Chromium.LaunchAsync(new() { Headless = true });
_page = await _browser.NewPageAsync();

_ya = _page.Ya(opts => opts.WithBaseUrl("https://the-internet.herokuapp.com")).TheInternet.Pages;
Expand Down

0 comments on commit be0fe73

Please sign in to comment.