From 5f2437ebd6c794f2cea9c0937cfa35667802cf26 Mon Sep 17 00:00:00 2001
From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com>
Date: Wed, 23 Jul 2025 00:49:01 +0300
Subject: [PATCH] [dotnet] [biid] Preserve BiDi global options when
instantiating BiDi instance
---
dotnet/src/webdriver/BiDi/BiDiOptions.cs | 24 +++++++++++++++++++
.../webdriver/BiDi/WebDriver.Extensions.cs | 2 +-
2 files changed, 25 insertions(+), 1 deletion(-)
create mode 100644 dotnet/src/webdriver/BiDi/BiDiOptions.cs
diff --git a/dotnet/src/webdriver/BiDi/BiDiOptions.cs b/dotnet/src/webdriver/BiDi/BiDiOptions.cs
new file mode 100644
index 0000000000000..7bcac32ca6c0d
--- /dev/null
+++ b/dotnet/src/webdriver/BiDi/BiDiOptions.cs
@@ -0,0 +1,24 @@
+//
+// Licensed to the Software Freedom Conservancy (SFC) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The SFC licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+namespace OpenQA.Selenium.BiDi;
+
+public sealed class BiDiOptions
+{
+}
diff --git a/dotnet/src/webdriver/BiDi/WebDriver.Extensions.cs b/dotnet/src/webdriver/BiDi/WebDriver.Extensions.cs
index ee494f877957c..2ba4f65fc1a20 100644
--- a/dotnet/src/webdriver/BiDi/WebDriver.Extensions.cs
+++ b/dotnet/src/webdriver/BiDi/WebDriver.Extensions.cs
@@ -24,7 +24,7 @@ namespace OpenQA.Selenium.BiDi;
public static class WebDriverExtensions
{
- public static async Task AsBiDiAsync(this IWebDriver webDriver)
+ public static async Task AsBiDiAsync(this IWebDriver webDriver, BiDiOptions? options = null)
{
if (webDriver is null) throw new ArgumentNullException(nameof(webDriver));