diff --git a/examples/dotnet/SeleniumDocs/BaseTest.cs b/examples/dotnet/SeleniumDocs/BaseTest.cs index 15b53726fc9..7c3e930db75 100644 --- a/examples/dotnet/SeleniumDocs/BaseTest.cs +++ b/examples/dotnet/SeleniumDocs/BaseTest.cs @@ -36,6 +36,7 @@ public void Cleanup() protected void StartDriver(string browserVersion = null) { ChromeOptions options = new ChromeOptions(); + options.UseWebSocketUrl = true; if (browserVersion != null) { options.BrowserVersion = browserVersion; diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Activate.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Activate.cs new file mode 100644 index 00000000000..65fbf274207 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Activate.cs @@ -0,0 +1,13 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task Activate() + { + await context.ActivateAsync(); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs new file mode 100644 index 00000000000..728cb9f0f8d --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs @@ -0,0 +1,42 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task CaptureScreenshot() + { + var screenshot = await context.CaptureScreenshotAsync(); + + Assert.IsNotNull(screenshot); + Assert.IsNotNull(screenshot.Data); + Assert.IsNotNull(screenshot.ToByteArray()); + } + + [TestMethod] + public async Task CaptureViewportScreenshot() + { + var screenshot = await context.CaptureScreenshotAsync(new() { Clip = new BoxClipRectangle(5, 5, 10, 10) }); + + Assert.IsNotNull(screenshot); + Assert.IsNotNull(screenshot.Data); + } + + [TestMethod] + public async Task CaptureElementScreenshot() + { + driver.Url = "https://www.selenium.dev/selenium/web/formPage.html"; + + var nodes = (await context.LocateNodesAsync(new CssLocator("#checky"))).Nodes; + + Assert.IsTrue(nodes.Length > 0, "Expected to locate #checky"); + + var screenshot = await context.CaptureScreenshotAsync(new() { Clip = new ElementClipRectangle(nodes[0]) }); + + Assert.IsNotNull(screenshot); + Assert.IsNotNull(screenshot.Data); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Close.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Close.cs new file mode 100644 index 00000000000..3d6fdf67770 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Close.cs @@ -0,0 +1,24 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task CloseTab() + { + var context = (await bidi.BrowsingContext.CreateAsync(ContextType.Tab)).Context; + + await context.CloseAsync(); + } + + [TestMethod] + public async Task CloseWindow() + { + var context = (await bidi.BrowsingContext.CreateAsync(ContextType.Window)).Context; + + await context.CloseAsync(); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs new file mode 100644 index 00000000000..ad8da92ee7c --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs @@ -0,0 +1,57 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task OpenNewTab() + { + var bidi = await driver.AsBiDiAsync(); + + var context = (await bidi.BrowsingContext.CreateAsync(ContextType.Tab)).Context; + + Assert.IsNotNull(context); + } + + [TestMethod] + public async Task OpenNewWindow() + { + var bidi = await driver.AsBiDiAsync(); + + var context = (await bidi.BrowsingContext.CreateAsync(ContextType.Window)).Context; + + Assert.IsNotNull(context); + } + + [TestMethod] + public async Task OpenTabWithReferenceBrowsingContext() + { + var context1 = context; + + var context2 = (await context1.BiDi.BrowsingContext.CreateAsync(ContextType.Tab, new() { ReferenceContext = context1 })).Context; + + Assert.IsNotNull(context2); + } + + [TestMethod] + public async Task OpenWindowWithReferenceBrowsingContext() + { + var context1 = context; + + var context2 = (await context1.BiDi.BrowsingContext.CreateAsync(ContextType.Window, new() { ReferenceContext = context1 })).Context; + + Assert.IsNotNull(context2); + } + + [TestMethod] + public async Task UseExistingWindowHandle() + { + var context = (await bidi.BrowsingContext.GetTreeAsync()).Contexts[0].Context; + + Assert.IsNotNull(context); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextCreated.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextCreated.cs new file mode 100644 index 00000000000..303213eeed4 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextCreated.cs @@ -0,0 +1,24 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task BrowsingContextCreatedEvent() + { + TaskCompletionSource tcs = new(); + + await bidi.BrowsingContext.ContextCreated.SubscribeAsync(args => tcs.TrySetResult(args)); + + driver.SwitchTo().NewWindow(OpenQA.Selenium.WindowType.Window); + + var info = await tcs.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + Assert.IsNotNull(info); + Console.WriteLine(info); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextDestroyed.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextDestroyed.cs new file mode 100644 index 00000000000..4940a9c0120 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextDestroyed.cs @@ -0,0 +1,25 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task BrowsingContextDestroyedEvent() + { + TaskCompletionSource tcs = new(); + + await bidi.BrowsingContext.ContextDestroyed.SubscribeAsync(args => tcs.TrySetResult(args)); + + await context.CloseAsync(); + + var contextInfo = await tcs.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + Assert.IsNotNull(contextInfo); + Assert.AreEqual(context, contextInfo.Context); + Console.WriteLine(contextInfo); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextLoaded.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextLoaded.cs new file mode 100644 index 00000000000..3a895c8618a --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextLoaded.cs @@ -0,0 +1,24 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task BrowsingContextLoadedEvent() + { + TaskCompletionSource tcs = new(); + + await context.Load.SubscribeAsync(args => tcs.TrySetResult(args)); + + await context.NavigateAsync("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html", new() { Wait = ReadinessState.Complete }); + + var navigationInfo = await tcs.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + Assert.IsNotNull(navigationInfo); + Console.WriteLine(navigationInfo); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.DomContentLoaded.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.DomContentLoaded.cs new file mode 100644 index 00000000000..5eb5116b266 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.DomContentLoaded.cs @@ -0,0 +1,24 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task DomContentLoadedEvent() + { + TaskCompletionSource tcs = new(); + + await context.DomContentLoaded.SubscribeAsync(args => tcs.TrySetResult(args)); + + await context.NavigateAsync("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html", new() { Wait = ReadinessState.Complete }); + + var navigationInfo = await tcs.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + Assert.IsNotNull(navigationInfo); + Console.WriteLine(navigationInfo); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.FragmentNavigated.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.FragmentNavigated.cs new file mode 100644 index 00000000000..9678b55aa82 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.FragmentNavigated.cs @@ -0,0 +1,26 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task FragmentNavigatedEvent() + { + await context.NavigateAsync("https://www.selenium.dev/selenium/web/linked_image.html", new() { Wait = ReadinessState.Complete }); + + TaskCompletionSource tcs = new(); + + await context.FragmentNavigated.SubscribeAsync(args => tcs.TrySetResult(args)); + + await context.NavigateAsync("https://www.selenium.dev/selenium/web/linked_image.html#linkToAnchorOnThisPage", new() { Wait = ReadinessState.Complete }); + + var navigationInfo = await tcs.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + Assert.IsNotNull(navigationInfo); + Console.WriteLine(navigationInfo); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.NavigationStarted.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.NavigationStarted.cs new file mode 100644 index 00000000000..760e55e6b91 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.NavigationStarted.cs @@ -0,0 +1,23 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task NavigationStartedEvent() + { + TaskCompletionSource tcs = new(); + + await context.NavigationStarted.SubscribeAsync(args => tcs.TrySetResult(args)); + + await context.NavigateAsync("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html", new() { Wait = ReadinessState.Complete }); + + var info = await tcs.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + Assert.IsNotNull(info); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs new file mode 100644 index 00000000000..0386a04cee9 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs @@ -0,0 +1,61 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium; +using OpenQA.Selenium.BiDi; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task UserPromptOpenedEvent() + { + TaskCompletionSource tcs = new(); + + await context.NavigateAsync("https://www.selenium.dev/selenium/web/alerts.html", new() { Wait = ReadinessState.Complete }); + + // TODO: this event can be a part of context + await bidi.BrowsingContext.UserPromptOpened.SubscribeAsync(args => tcs.TrySetResult(args)); + + driver.FindElement(By.Id("prompt")).Click(); + + var userPromptOpenedEventArgs = await tcs.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + Assert.IsNotNull(userPromptOpenedEventArgs); + Console.WriteLine(userPromptOpenedEventArgs); + } + + [TestMethod] + public async Task UserPromptClosedEvent() + { + TaskCompletionSource opened = new(); + TaskCompletionSource closed = new(); + + await context.NavigateAsync("https://www.selenium.dev/selenium/web/alerts.html", new() { Wait = ReadinessState.Complete }); + + // TODO: these events can be a part of context + await bidi.BrowsingContext.UserPromptOpened.SubscribeAsync(args => opened.TrySetResult(args)); + await bidi.BrowsingContext.UserPromptClosed.SubscribeAsync(args => closed.TrySetResult(args)); + + driver.FindElement(By.Id("prompt")).Click(); + + await opened.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + try + { + // Chrome's default unhandled prompt behavior may already have closed the + // prompt by this point; tolerate that instead of treating it as a failure. + await context.HandleUserPromptAsync(new() { Accept = true }); + } + catch (BiDiException ex) when (ex.Message.Contains("no such alert")) + { + } + + var userPromptClosedEventArgs = await closed.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + Assert.IsNotNull(userPromptClosedEventArgs); + Console.WriteLine(userPromptClosedEventArgs); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs new file mode 100644 index 00000000000..648be2566d6 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs @@ -0,0 +1,44 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System.Linq; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task GetBrowsingContextTree() + { + await context.NavigateAsync("https://www.selenium.dev/selenium/web/iframes.html", new() { Wait = ReadinessState.Complete }); + + var contexts = (await context.GetTreeAsync()).Contexts; + + Assert.AreEqual(1, contexts.Length); + Assert.IsNotNull(contexts[0].Children); + Assert.IsTrue(contexts[0].Children.Value.Length >= 1, "Context should contain iframes as children"); + } + + [TestMethod] + public async Task GetBrowsingContextTreeWithDepth() + { + await context.NavigateAsync("https://www.selenium.dev/selenium/web/iframes.html", new() { Wait = ReadinessState.Complete }); + + var contexts = (await context.GetTreeAsync(new() { MaxDepth = 0 })).Contexts; + + Assert.AreEqual(1, contexts.Length); + Assert.IsNull(contexts[0].Children, "Context should not contain iframes as children since depth is 0"); + } + + [TestMethod] + public async Task GetAllTopLevelBrowsingContexts() + { + var window = (await bidi.BrowsingContext.CreateAsync(ContextType.Window)).Context; + + var contexts = (await bidi.BrowsingContext.GetTreeAsync()).Contexts; + + Assert.AreEqual(2, contexts.Length); + Assert.IsTrue(contexts.Any(c => c.Context == window)); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.HandleUserPrompt.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.HandleUserPrompt.cs new file mode 100644 index 00000000000..4ec5ded7075 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.HandleUserPrompt.cs @@ -0,0 +1,35 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium; +using OpenQA.Selenium.BiDi; +using OpenQA.Selenium.BiDi.BrowsingContext; +using OpenQA.Selenium.Firefox; +using System; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task HandleUserPrompt() + { + // temporary use firefox because of chrome automatically handle prompts + using var driver = new FirefoxDriver(new FirefoxOptions() { UseWebSocketUrl = true, UnhandledPromptBehavior = UnhandledPromptBehavior.Ignore }); + + var bidi = await driver.AsBiDiAsync(); + + var context = (await bidi.BrowsingContext.GetTreeAsync()).Contexts[0].Context; + + driver.Url = "https://www.selenium.dev/selenium/web/alerts.html"; + + TaskCompletionSource promptOpened = new(); + + await bidi.BrowsingContext.UserPromptOpened.SubscribeAsync(args => promptOpened.TrySetResult(args)); + + driver.FindElement(By.Id("prompt-with-default")).Click(); + + await promptOpened.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + await context.HandleUserPromptAsync(new() { Accept = true, UserText = "Selenium automates browsers" }); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs new file mode 100644 index 00000000000..15109eeca83 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs @@ -0,0 +1,81 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task NavigateToUrl() + { + var info = await context.NavigateAsync("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html"); + + Assert.IsNotNull(info); + Assert.IsNotNull(info.Navigation); + StringAssert.Contains(info.Url, "/bidi/logEntryAdded.html"); + } + + [TestMethod] + public async Task NavigateToUrlWithReadinessState() + { + var info = await context.NavigateAsync("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html", new() { Wait = ReadinessState.Complete }); + + Assert.IsNotNull(info); + Assert.IsNotNull(info.Navigation); + StringAssert.Contains(info.Url, "/bidi/logEntryAdded.html"); + } + + [TestMethod] + public async Task NavigateBack() + { + await context.NavigateAsync("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html", new() { Wait = ReadinessState.Complete }); + + await context.TraverseHistoryAsync(-1); + + var url = await WaitForUrlAsync("about:blank"); + + Assert.AreEqual("about:blank", url); + } + + [TestMethod] + public async Task NavigateForward() + { + await context.NavigateAsync("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html", new() { Wait = ReadinessState.Complete }); + + await context.TraverseHistoryAsync(-1); + await WaitForUrlAsync("about:blank"); + + await context.TraverseHistoryAsync(1); + var url = await WaitForUrlAsync("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html"); + + Assert.AreEqual("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html", url); + } + + private async Task WaitForUrlAsync(string expectedUrl) + { + var deadline = DateTime.UtcNow.AddSeconds(5); + string url; + do + { + url = (await context.GetTreeAsync()).Contexts[0].Url; + if (url == expectedUrl) return url; + await Task.Delay(100); + } while (DateTime.UtcNow < deadline); + + return url; + } + + [TestMethod] + public async Task TraverseHistory() + { + await context.NavigateAsync("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html", new() { Wait = ReadinessState.Complete }); + + await context.TraverseHistoryAsync(-1); + + var url = await WaitForUrlAsync("about:blank"); + + Assert.AreEqual("about:blank", url); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Print.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Print.cs new file mode 100644 index 00000000000..07056fd63ce --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Print.cs @@ -0,0 +1,17 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task PrintPage() + { + var pdf = await context.PrintAsync(new() { PageRanges = [1, 2, 3..5, new(3, 5), 7..] }); + + Assert.IsNotNull(pdf); + Assert.IsNotNull(pdf.Data); + Assert.IsNotNull(pdf.ToByteArray()); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Reload.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Reload.cs new file mode 100644 index 00000000000..675b2d36ff8 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Reload.cs @@ -0,0 +1,20 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task Reload() + { + await context.NavigateAsync("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html", new() { Wait = ReadinessState.Complete }); + + var info = await context.ReloadAsync(); + + Assert.IsNotNull(info); + Assert.IsNotNull(info.Navigation); + StringAssert.Contains(info.Url, "/bidi/logEntryAdded.html"); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.SetViewport.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.SetViewport.cs new file mode 100644 index 00000000000..5222cc80103 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.SetViewport.cs @@ -0,0 +1,14 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi.BrowsingContext; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +partial class BrowsingContextTest +{ + [TestMethod] + public async Task SetViewport() + { + await context.SetViewportAsync(new() { Viewport = new Viewport(Width: 250, Height: 300), DevicePixelRatio = 5 }); + } +} diff --git a/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.cs b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.cs new file mode 100644 index 00000000000..622675d9514 --- /dev/null +++ b/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.cs @@ -0,0 +1,21 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.BiDi; +using System.Threading.Tasks; + +namespace SeleniumDocs.BiDi.BrowsingContext; + +[TestClass] +public partial class BrowsingContextTest : BaseChromeTest +{ + private IBiDi bidi; + + private OpenQA.Selenium.BiDi.BrowsingContext.BrowsingContext context; + + [TestInitialize] + public async Task InitializeBidi() + { + bidi = await driver.AsBiDiAsync(); + + context = (await bidi.BrowsingContext.GetTreeAsync()).Contexts[0].Context; + } +} diff --git a/examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs b/examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs index 3b6d0e6cd65..8c40a04f441 100644 --- a/examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs +++ b/examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs @@ -23,11 +23,11 @@ public void Cleanup() { File.Delete(_logLocation); } - if (_tempPath != null && File.Exists(_tempPath)) + driver.Quit(); + if (_tempPath != null && Directory.Exists(_tempPath)) { - File.Delete(_tempPath); + Directory.Delete(_tempPath, true); } - driver.Quit(); } [TestMethod] @@ -123,10 +123,10 @@ public void SetProfileLocation() driver = new FirefoxDriver(service); - string profile = (string)driver.Capabilities.GetCapability("moz:profile"); - string[] directories = profile.Split("/"); - var dirName = directories.Last(); - Assert.AreEqual(GetTempDirectory() + dirName, profile); + string profile = ((string)driver.Capabilities.GetCapability("moz:profile")).Replace('\\', '/'); + var dirName = profile.Split('/').Last(); + var profileDirectories = Directory.GetDirectories(GetTempDirectory()).Select(Path.GetFileName); + Assert.IsTrue(profileDirectories.Contains(dirName)); } [TestMethod] @@ -183,9 +183,9 @@ private string GetLogLocation() private string GetTempDirectory() { - if (string.IsNullOrEmpty(_tempPath) && !File.Exists(_tempPath)) + if (string.IsNullOrEmpty(_tempPath)) { - _tempPath = Path.GetTempPath(); + _tempPath = Directory.CreateTempSubdirectory("profile-").FullName; } return _tempPath; diff --git a/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.en.md b/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.en.md index 3149dbf11f0..3baacf3e248 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.en.md +++ b/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.en.md @@ -19,6 +19,9 @@ Creates a new browsing context in a new window. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L51" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L23-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -40,6 +43,9 @@ Creates a new browsing context in a new tab. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L60-L63" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L13-L17" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -61,6 +67,9 @@ Creates a browsing context for the existing tab/window to run commands. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L39-L43" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L53-L55" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -83,6 +92,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L52-L57" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L43-L47" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -104,6 +116,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L66-L71" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L33-L37" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -123,6 +138,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L74-L82" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L13-L17" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -142,6 +160,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L85-L94" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L23-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -163,6 +184,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L97-L110" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L14-L20" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -184,6 +208,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L113-L125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L26-L31" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -203,6 +230,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L128-L135" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L37-L42" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -222,6 +252,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L138-L155" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Close.cs#L9-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -241,6 +274,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L159-L163" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Activate.cs#L11" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -262,6 +298,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L171-L175" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Reload.cs#L12-L18" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -281,6 +320,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L222-L230" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.HandleUserPrompt.cs#L16-L33" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -300,6 +342,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L250-L254" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L12-L16" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -319,6 +364,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L261-L270" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L22-L25" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -338,6 +386,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L277-L282" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L31-L40" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -357,6 +408,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L306-L309" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.SetViewport.cs#L12" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -377,6 +431,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L319-L324" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Print.cs#L11-L15" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -396,6 +453,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L332-L338" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L33-L39" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -415,6 +475,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L344-L354" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L45-L53" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -434,6 +497,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L361-L367" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L73-L79" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -456,6 +522,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L36-L43" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextCreated.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -475,6 +544,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L56-L65" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.DomContentLoaded.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -494,6 +566,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L83-90" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextLoaded.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -513,6 +588,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L99-106" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.NavigationStarted.cs#L13-L21" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -531,6 +609,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L115-125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.FragmentNavigated.cs#L13-L24" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -550,6 +631,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L115-125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs#L15-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -568,6 +652,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L152-165" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs#L33-L59" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -586,6 +673,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.18" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L172-L183" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextDestroyed.cs#L13-L23" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.ja.md b/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.ja.md index 5d493d62635..0107b1ca063 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.ja.md +++ b/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.ja.md @@ -25,6 +25,9 @@ Creates a new browsing context in a new window. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L51" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L23-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -46,6 +49,9 @@ Creates a new browsing context in a new tab. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L60-L63" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L13-L17" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -67,6 +73,9 @@ Creates a browsing context for the existing tab/window to run commands. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L39-L43" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L53-L55" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -89,6 +98,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L52-L57" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L43-L47" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -110,6 +122,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L66-L71" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L33-L37" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -129,6 +144,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L74-L82" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L13-L17" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -148,6 +166,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L85-L94" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L23-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -169,6 +190,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L97-L110" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L14-L20" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -190,6 +214,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L113-L125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L26-L31" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -209,6 +236,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L128-L135" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L37-L42" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -228,6 +258,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L138-L155" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Close.cs#L9-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -247,6 +280,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L159-L163" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Activate.cs#L11" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -268,6 +304,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L171-L175" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Reload.cs#L12-L18" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -287,6 +326,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L222-L230" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.HandleUserPrompt.cs#L16-L33" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -306,6 +348,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L250-L254" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L12-L16" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -325,6 +370,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L261-L270" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L22-L25" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -344,6 +392,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L277-L282" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L31-L40" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -363,6 +414,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L306-L309" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.SetViewport.cs#L12" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -383,6 +437,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L319-L324" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Print.cs#L11-L15" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -402,6 +459,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L332-L338" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L33-L39" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -421,6 +481,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L344-L354" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L45-L53" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -440,6 +503,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L361-L367" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L73-L79" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -462,6 +528,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L36-L43" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextCreated.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -481,6 +550,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L56-L65" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.DomContentLoaded.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -500,6 +572,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L83-90" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextLoaded.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -519,6 +594,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L99-106" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.NavigationStarted.cs#L13-L21" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -537,6 +615,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L115-125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.FragmentNavigated.cs#L13-L24" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -556,6 +637,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L115-125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs#L15-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -574,6 +658,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L152-165" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs#L33-L59" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -592,6 +679,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.18" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L172-L183" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextDestroyed.cs#L13-L23" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.pt-br.md b/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.pt-br.md index b8530b382e6..60416a648ae 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.pt-br.md @@ -25,6 +25,9 @@ Creates a new browsing context in a new window. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L51" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L23-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -46,6 +49,9 @@ Creates a new browsing context in a new tab. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L60-L63" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L13-L17" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -67,6 +73,9 @@ Creates a browsing context for the existing tab/window to run commands. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L39-L43" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L53-L55" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -89,6 +98,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L52-L57" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L43-L47" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -110,6 +122,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L66-L71" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L33-L37" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -129,6 +144,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L74-L82" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L13-L17" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -148,6 +166,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L85-L94" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L23-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -169,6 +190,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L97-L110" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L14-L20" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -190,6 +214,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L113-L125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L26-L31" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -209,6 +236,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L128-L135" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L37-L42" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -228,6 +258,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L138-L155" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Close.cs#L9-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -247,6 +280,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L159-L163" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Activate.cs#L11" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -268,6 +304,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L171-L175" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Reload.cs#L12-L18" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -287,6 +326,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L222-L230" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.HandleUserPrompt.cs#L16-L33" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -306,6 +348,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L250-L254" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L12-L16" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -325,6 +370,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L261-L270" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L22-L25" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -344,6 +392,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L277-L282" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L31-L40" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -363,6 +414,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L306-L309" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.SetViewport.cs#L12" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -383,6 +437,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L319-L324" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Print.cs#L11-L15" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -402,6 +459,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L332-L338" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L33-L39" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -421,6 +481,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L344-L354" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L45-L53" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -440,6 +503,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L361-L367" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L73-L79" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -462,6 +528,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L36-L43" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextCreated.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -481,6 +550,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L56-L65" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.DomContentLoaded.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -500,6 +572,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L83-90" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextLoaded.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -519,6 +594,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L99-106" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.NavigationStarted.cs#L13-L21" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -537,6 +615,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L115-125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.FragmentNavigated.cs#L13-L24" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -556,6 +637,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L115-125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs#L15-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -574,6 +658,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L152-165" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs#L33-L59" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -592,6 +679,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.18" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L172-L183" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextDestroyed.cs#L13-L23" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.zh-cn.md b/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.zh-cn.md index d2c7a6a2fe3..ce409d45b43 100644 --- a/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/bidi/w3c/browsing_context.zh-cn.md @@ -25,6 +25,9 @@ Creates a new browsing context in a new window. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L51" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L23-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -46,6 +49,9 @@ Creates a new browsing context in a new tab. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L60-L63" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L13-L17" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -67,6 +73,9 @@ Creates a browsing context for the existing tab/window to run commands. {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L39-L43" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L53-L55" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -89,6 +98,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L52-L57" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L43-L47" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -110,6 +122,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L66-L71" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Create.cs#L33-L37" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -129,6 +144,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L74-L82" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L13-L17" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -148,6 +166,9 @@ The API allows to pass the reference browsing context, which is used to create a {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L85-L94" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L23-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -169,6 +190,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L97-L110" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L14-L20" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -190,6 +214,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L113-L125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L26-L31" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -209,6 +236,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L128-L135" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetTree.cs#L37-L42" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -228,6 +258,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.8" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L138-L155" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Close.cs#L9-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -247,6 +280,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L159-L163" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Activate.cs#L11" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -268,6 +304,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L171-L175" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Reload.cs#L12-L18" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -287,6 +326,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L222-L230" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.HandleUserPrompt.cs#L16-L33" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -306,6 +348,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.13.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L250-L254" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L12-L16" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -325,6 +370,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L261-L270" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L22-L25" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -344,6 +392,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L277-L282" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CaptureScreenshot.cs#L31-L40" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -363,6 +414,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L306-L309" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.SetViewport.cs#L12" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -383,6 +437,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.14.1" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L319-L324" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Print.cs#L11-L15" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -402,6 +459,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L332-L338" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L33-L39" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -421,6 +481,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L344-L354" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L45-L53" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -440,6 +503,9 @@ Provides a tree of all browsing contexts descending from the parent browsing con {{< badge-version version="4.16.0" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextTest.java#L361-L367" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Navigate.cs#L73-L79" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -462,6 +528,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L36-L43" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextCreated.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -481,6 +550,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L56-L65" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.DomContentLoaded.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -500,6 +572,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.10" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L83-90" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextLoaded.cs#L13-L22" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -519,6 +594,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L99-106" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.NavigationStarted.cs#L13-L21" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -537,6 +615,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L115-125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.FragmentNavigated.cs#L13-L24" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -556,6 +637,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L115-125" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs#L15-L27" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -574,6 +658,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.15" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L152-165" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.UserPrompt.cs#L33-L59" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} @@ -592,6 +679,9 @@ This section contains the APIs related to browsing context events. {{< badge-version version="4.18" >}} {{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/bidirectional/webdriver_bidi/BrowsingContextInspectorTest.java#L172-L183" >}} {{< /tab >}} +{{< tab header="CSharp" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.Event.BrowsingContextDestroyed.cs#L13-L23" >}} +{{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} {{< /tab >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.en.md b/website_and_docs/content/documentation/webdriver/drivers/_index.en.md index 054ff155670..f7ed6b0f279 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.en.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.en.md @@ -35,7 +35,7 @@ on the local machine. {{< gh-codeblock path="/examples/python/tests/drivers/test_options.py#L9" >}} {{% /tab %}} {{< tab header="CSharp" >}} -{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BaseTest.cs#L48" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BaseTest.cs#L49" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="/examples/ruby/spec/drivers/options_spec.rb#L14" >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md b/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md index 6868a177626..993422a44e0 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md @@ -32,7 +32,7 @@ weight: 3 {{< gh-codeblock path="/examples/python/tests/drivers/test_options.py#L9" >}} {{% /tab %}} {{< tab header="CSharp" >}} -{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BaseTest.cs#L48" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BaseTest.cs#L49" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="/examples/ruby/spec/drivers/options_spec.rb#L14" >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md b/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md index a2783c16e35..76bb5d7e376 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md @@ -33,7 +33,7 @@ O principal argumento exclusivo para iniciar um driver local inclui informaçõe {{< gh-codeblock path="/examples/python/tests/drivers/test_options.py#L9" >}} {{% /tab %}} {{< tab header="CSharp" >}} -{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BaseTest.cs#L48" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BaseTest.cs#L49" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="/examples/ruby/spec/drivers/options_spec.rb#L14" >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md b/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md index ce2958db1f9..6dd9fc198f4 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md @@ -33,7 +33,7 @@ weight: 3 {{< gh-codeblock path="/examples/python/tests/drivers/test_options.py#L9" >}} {{% /tab %}} {{< tab header="CSharp" >}} -{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BaseTest.cs#L48" >}} +{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/BaseTest.cs#L49" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="/examples/ruby/spec/drivers/options_spec.rb#L14" >}}