From be0fe73307d47660af8e96b34d3d5a17bfafda50 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:57:50 +0300 Subject: [PATCH] headless? --- sample/Yapoml.Playwright.Sample/Basics/NuGetSearchTest.cs | 2 +- sample/Yapoml.Playwright.Sample/NuGetSearchTest.cs | 6 ------ sample/Yapoml.Playwright.Sample/SwagLabs/SwagLabsTests.cs | 2 +- .../TheInternet/TheInternetFixture.cs | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sample/Yapoml.Playwright.Sample/Basics/NuGetSearchTest.cs b/sample/Yapoml.Playwright.Sample/Basics/NuGetSearchTest.cs index 0108ac8..53af265 100644 --- a/sample/Yapoml.Playwright.Sample/Basics/NuGetSearchTest.cs +++ b/sample/Yapoml.Playwright.Sample/Basics/NuGetSearchTest.cs @@ -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"); diff --git a/sample/Yapoml.Playwright.Sample/NuGetSearchTest.cs b/sample/Yapoml.Playwright.Sample/NuGetSearchTest.cs index 4747327..f26b6c4 100644 --- a/sample/Yapoml.Playwright.Sample/NuGetSearchTest.cs +++ b/sample/Yapoml.Playwright.Sample/NuGetSearchTest.cs @@ -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() { diff --git a/sample/Yapoml.Playwright.Sample/SwagLabs/SwagLabsTests.cs b/sample/Yapoml.Playwright.Sample/SwagLabs/SwagLabsTests.cs index 4c79a9a..6070fd2 100644 --- a/sample/Yapoml.Playwright.Sample/SwagLabs/SwagLabsTests.cs +++ b/sample/Yapoml.Playwright.Sample/SwagLabs/SwagLabsTests.cs @@ -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; diff --git a/sample/Yapoml.Playwright.Sample/TheInternet/TheInternetFixture.cs b/sample/Yapoml.Playwright.Sample/TheInternet/TheInternetFixture.cs index 3a73b02..3415fc9 100644 --- a/sample/Yapoml.Playwright.Sample/TheInternet/TheInternetFixture.cs +++ b/sample/Yapoml.Playwright.Sample/TheInternet/TheInternetFixture.cs @@ -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;