Skip to content

Commit 4559f3c

Browse files
wtgodbeCopilot
andauthored
[release/8.0] Update Selenium and Playwright versions to match main (#67273)
* Update Selenium and Playwright versions to match main Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove Devtools option removed in Playwright 1.60 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * React to Playwright 1.60 obsolete navigation/input APIs Playwright 1.60 marks IPage.WaitForNavigationAsync and IPage.TypeAsync as [Obsolete] (CS0612, treated as error). Migrate BlazorWasmTemplateTest to the non-obsolete replacements used on main: WaitForURLAsync(url, options) and FillAsync, preserving the existing test behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 14e9766 commit 4559f3c

3 files changed

Lines changed: 13 additions & 15 deletions

File tree

‎eng/Versions.props‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,11 @@
305305
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
306306
<NSwagApiDescriptionClientVersion>13.0.4</NSwagApiDescriptionClientVersion>
307307
<PhotinoNETVersion>2.5.2</PhotinoNETVersion>
308-
<MicrosoftPlaywrightVersion>1.28.0</MicrosoftPlaywrightVersion>
308+
<MicrosoftPlaywrightVersion>1.60.0</MicrosoftPlaywrightVersion>
309309
<PollyExtensionsHttpVersion>3.0.0</PollyExtensionsHttpVersion>
310310
<PollyVersion>7.2.4</PollyVersion>
311-
<SeleniumSupportVersion>4.17.0</SeleniumSupportVersion>
312-
<SeleniumWebDriverVersion>4.17.0</SeleniumWebDriverVersion>
311+
<SeleniumSupportVersion>4.44.0</SeleniumSupportVersion>
312+
<SeleniumWebDriverVersion>4.44.0</SeleniumWebDriverVersion>
313313
<SerilogExtensionsLoggingVersion>1.4.0</SerilogExtensionsLoggingVersion>
314314
<SerilogSinksFileVersion>4.0.0</SerilogSinksFileVersion>
315315
<StackExchangeRedisVersion>2.7.27</StackExchangeRedisVersion>

‎src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWasmTemplateTest.cs‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ private static async Task TestBasicNavigation(string appName, IPage page, bool u
320320

321321
// Can navigate to the counter page
322322
await Task.WhenAll(
323-
page.WaitForNavigationAsync(new() { UrlString = "**/counter" }),
323+
page.WaitForURLAsync("**/counter"),
324324
page.WaitForSelectorAsync("h1 >> text=Counter"),
325325
page.WaitForSelectorAsync("p >> text=Current count: 0"),
326326
page.ClickAsync("a[href=counter]"));
@@ -333,36 +333,36 @@ await Task.WhenAll(
333333
if (usesAuth)
334334
{
335335
await Task.WhenAll(
336-
page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/Login**", WaitUntil = WaitUntilState.NetworkIdle }),
336+
page.WaitForURLAsync("**/Identity/Account/Login**", new() { WaitUntil = WaitUntilState.NetworkIdle }),
337337
page.ClickAsync("text=Log in"));
338338

339339
await Task.WhenAll(
340340
page.WaitForSelectorAsync("[name=\"Input.Email\"]"),
341-
page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/Register**", WaitUntil = WaitUntilState.NetworkIdle }),
341+
page.WaitForURLAsync("**/Identity/Account/Register**", new() { WaitUntil = WaitUntilState.NetworkIdle }),
342342
page.ClickAsync("text=Register as a new user"));
343343

344344
var userName = $"{Guid.NewGuid()}@example.com";
345345
var password = "[PLACEHOLDER]-1a";
346346

347-
await page.TypeAsync("[name=\"Input.Email\"]", userName);
348-
await page.TypeAsync("[name=\"Input.Password\"]", password);
349-
await page.TypeAsync("[name=\"Input.ConfirmPassword\"]", password);
347+
await page.FillAsync("[name=\"Input.Email\"]", userName);
348+
await page.FillAsync("[name=\"Input.Password\"]", password);
349+
await page.FillAsync("[name=\"Input.ConfirmPassword\"]", password);
350350

351351
// We will be redirected to the RegisterConfirmation
352352
await Task.WhenAll(
353-
page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/RegisterConfirmation**", WaitUntil = WaitUntilState.NetworkIdle }),
353+
page.WaitForURLAsync("**/Identity/Account/RegisterConfirmation**", new() { WaitUntil = WaitUntilState.NetworkIdle }),
354354
page.ClickAsync("#registerSubmit"));
355355

356356
// We will be redirected to the ConfirmEmail
357357
await Task.WhenAll(
358-
page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/ConfirmEmail**", WaitUntil = WaitUntilState.NetworkIdle }),
358+
page.WaitForURLAsync("**/Identity/Account/ConfirmEmail**", new() { WaitUntil = WaitUntilState.NetworkIdle }),
359359
page.ClickAsync("text=Click here to confirm your account"));
360360

361361
// Now we can login
362362
await page.ClickAsync("text=Login");
363363
await page.WaitForSelectorAsync("[name=\"Input.Email\"]");
364-
await page.TypeAsync("[name=\"Input.Email\"]", userName);
365-
await page.TypeAsync("[name=\"Input.Password\"]", password);
364+
await page.FillAsync("[name=\"Input.Email\"]", userName);
365+
await page.FillAsync("[name=\"Input.Password\"]", password);
366366
await page.ClickAsync("#login-submit");
367367

368368
// Need to navigate to fetch page

‎src/Shared/BrowserTesting/src/BrowserManagerConfiguration.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ string EnsureFolderExists(string folderPath)
205205
Env = configuration.GetValue<Dictionary<string, string>>(nameof(BrowserTypeLaunchOptions.Env)),
206206
DownloadsPath = configuration.GetValue<string>(nameof(BrowserTypeLaunchOptions.DownloadsPath)),
207207
ExecutablePath = configuration.GetValue<string>(nameof(BrowserTypeLaunchOptions.ExecutablePath)),
208-
Devtools = configuration.GetValue<bool?>(nameof(BrowserTypeLaunchOptions.Devtools)),
209208
Args = BindMultiValueMap(
210209
configuration.GetSection(nameof(BrowserTypeLaunchOptions.Args)),
211210
argsMap => argsMap.SelectMany(argNameValue => argNameValue.Value.Prepend(argNameValue.Key)).ToArray()),
@@ -342,7 +341,6 @@ private static BrowserTypeLaunchOptions Combine(BrowserTypeLaunchOptions default
342341
Env = overrideOptions.Env != default ? overrideOptions.Env : defaultOptions.Env,
343342
DownloadsPath = overrideOptions.DownloadsPath != default ? overrideOptions.DownloadsPath : defaultOptions.DownloadsPath,
344343
ExecutablePath = overrideOptions.ExecutablePath != default ? overrideOptions.ExecutablePath : defaultOptions.ExecutablePath,
345-
Devtools = overrideOptions.Devtools != default ? overrideOptions.Devtools : defaultOptions.Devtools,
346344
Args = overrideOptions.Args != default ? overrideOptions.Args : defaultOptions.Args,
347345
Headless = overrideOptions.Headless != default ? overrideOptions.Headless : defaultOptions.Headless,
348346
Timeout = overrideOptions.Timeout != default ? overrideOptions.Timeout : defaultOptions.Timeout,

0 commit comments

Comments
 (0)