Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: use net8.0 for webview2 tests (#28665)

Max Schmitt35b61b7cdff1
diff --git a/.github/workflows/tests_webview2.yml b/.github/workflows/tests_webview2.yml
index 4fd33af5ba..45e9d38a6d 100644
--- a/.github/workflows/tests_webview2.yml
+++ b/.github/workflows/tests_webview2.yml
@@ -29,9 +29,9 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- - uses: actions/setup-dotnet@v2
+ - uses: actions/setup-dotnet@v3
with:
- dotnet-version: '6.0.x'
+ dotnet-version: '8.0.x'
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
diff --git a/tests/webview2/globalSetup.ts b/tests/webview2/globalSetup.ts
index 4ac3b9e0ba..7d8a340d9c 100644
--- a/tests/webview2/globalSetup.ts
+++ b/tests/webview2/globalSetup.ts
@@ -19,7 +19,7 @@ import playwright from 'playwright';
export default async () => {
const cdpPort = 9876;
- const spawnedProcess = childProcess.spawn(path.join(__dirname, 'webview2-app/bin/Debug/net6.0-windows/webview2.exe'), {
+ const spawnedProcess = childProcess.spawn(path.join(__dirname, 'webview2-app/bin/Debug/net8.0-windows/webview2.exe'), {
shell: true,
env: {
...process.env,
diff --git a/tests/webview2/webView2Test.ts b/tests/webview2/webView2Test.ts
index 38a6c4ca1e..b72f57ce93 100644
--- a/tests/webview2/webView2Test.ts
+++ b/tests/webview2/webView2Test.ts
@@ -35,7 +35,7 @@ export const webView2Test = baseTest.extend<TraceViewerFixtures>(traceViewerFixt
browser: [async ({ playwright }, use, testInfo) => {
const cdpPort = 10000 + testInfo.workerIndex;
const spawnedProcess = new TestChildProcess({
- command: [path.join(__dirname, 'webview2-app/bin/Debug/net6.0-windows/webview2.exe')],
+ command: [path.join(__dirname, 'webview2-app/bin/Debug/net8.0-windows/webview2.exe')],
shell: true,
env: {
...process.env,
diff --git a/tests/webview2/webview2-app/webview2.csproj b/tests/webview2/webview2-app/webview2.csproj
index ef2fc1b782..84849567c4 100644
--- a/tests/webview2/webview2-app/webview2.csproj
+++ b/tests/webview2/webview2-app/webview2.csproj
@@ -2,14 +2,14 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
- <TargetFramework>net6.0-windows</TargetFramework>
+ <TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1293.44" />
+ <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2210.55" />
</ItemGroup>
</Project>
\ No newline at end of file