From c85c319f7343c1afd44971c065e2eff1ce4e0d6e Mon Sep 17 00:00:00 2001 From: wanggaofeng <15601716045@163.com> Date: Wed, 31 Jan 2024 17:02:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PlaywrightStudy.Test/PlaywrightTest.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/PlaywrightStudy.Test/PlaywrightTest.cs b/PlaywrightStudy.Test/PlaywrightTest.cs index f103b5a..099cad5 100644 --- a/PlaywrightStudy.Test/PlaywrightTest.cs +++ b/PlaywrightStudy.Test/PlaywrightTest.cs @@ -3,6 +3,20 @@ namespace PlaywrightStudy.Test { public class PlaywrightTest { + /// + /// 通过 API 安装浏览器 + /// 当然有多种安装方式 + /// + [Fact] + public void Install_Browsers_Test() + { + var exitCode = Microsoft.Playwright.Program.Main(new[] { "install" }); + if (exitCode != 0) + { + throw new Exception($"Playwright exited with code {exitCode}"); + } + } + #region Edge [Fact] public async void Baidu_Edge_Test()