From 2b3816b31458e263fd2dcbd7dffb5c10b1b2e436 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com> Date: Tue, 10 Sep 2024 18:49:47 +0300 Subject: [PATCH] Update BrowsingContextTest.FragmentNavigatedEvent.cs --- .../BrowsingContextTest.FragmentNavigatedEvent.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.FragmentNavigatedEvent.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.FragmentNavigatedEvent.cs index 2d3dc7b35213..8e791bd8e897 100644 --- a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.FragmentNavigatedEvent.cs +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.FragmentNavigatedEvent.cs @@ -2,7 +2,6 @@ using OpenQA.Selenium.BiDi; using OpenQA.Selenium.BiDi.Modules.BrowsingContext; using System; -using System.Threading; using System.Threading.Tasks; namespace SeleniumDocs.BiDi.BrowsingContext; @@ -14,6 +13,8 @@ public async Task FragmentNavigatedEvent() { var browsingContext = await driver.AsBidirectionalContextAsync(); + await browsingContext.NavigateAsync("https://www.selenium.dev/selenium/web/linked_image.html", new() { Wait = ReadinessState.Complete }); + TaskCompletionSource tcs = new(); await browsingContext.OnFragmentNavigatedAsync(tcs.SetResult);