Skip to content

Commit 5893627

Browse files
committed
[dotnet] remove deprecated methods for toggling legacy protocol
1 parent 5eb3caa commit 5893627

File tree

3 files changed

+0
-53
lines changed

3 files changed

+0
-53
lines changed

dotnet/src/webdriver/Chromium/ChromiumOptions.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -185,27 +185,6 @@ public ChromiumAndroidOptions AndroidOptions
185185
set { this.androidOptions = value; }
186186
}
187187

188-
/// <summary>
189-
/// Gets or sets a value indicating whether the <see cref="ChromiumDriver"/> instance
190-
/// should use the legacy OSS protocol dialect or a dialect compliant with the W3C
191-
/// WebDriver Specification.
192-
/// </summary>
193-
[Obsolete("Spec Compliant Protocol is the only supported protocol")]
194-
public bool UseSpecCompliantProtocol
195-
{
196-
get { return this.useSpecCompliantProtocol; }
197-
set
198-
{
199-
if (!value)
200-
{
201-
throw new ArgumentException("Only the spec compliant protocol is supported, " +
202-
"Please update to W3C Syntax: " +
203-
"https://www.selenium.dev/blog/2022/legacy-protocol-support/");
204-
}
205-
this.useSpecCompliantProtocol = true;
206-
}
207-
}
208-
209188
/// <summary>
210189
/// Adds a single argument to the list of arguments to be appended to the browser executable command line.
211190
/// </summary>

dotnet/src/webdriver/Safari/SafariDriverService.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ public sealed class SafariDriverService : DriverService
3434
{
3535
private const string DefaultSafariDriverServiceExecutableName = "safaridriver";
3636

37-
private bool useLegacyProtocol;
38-
3937
private readonly static ILogger logger = Log.GetLogger<SafariDriverService>();
4038

4139
/// <summary>
@@ -55,22 +53,6 @@ protected override DriverOptions GetDefaultDriverOptions()
5553
return new SafariOptions();
5654
}
5755

58-
/// <summary>
59-
/// Gets or sets a value indicating whether to use the default open-source project
60-
/// dialect of the protocol instead of the default dialect compliant with the
61-
/// W3C WebDriver Specification.
62-
/// </summary>
63-
/// <remarks>
64-
/// This is only valid for versions of the driver for Safari that target Safari 12
65-
/// or later, and will result in an error if used with prior versions of the driver.
66-
/// </remarks>
67-
[Obsolete("Only w3c protocol is currently supported")]
68-
public bool UseLegacyProtocol
69-
{
70-
get { return this.useLegacyProtocol; }
71-
set { this.useLegacyProtocol = value; }
72-
}
73-
7456
/// <summary>
7557
/// Gets the command-line arguments for the driver service.
7658
/// </summary>
@@ -79,11 +61,6 @@ protected override string CommandLineArguments
7961
get
8062
{
8163
StringBuilder argsBuilder = new StringBuilder(base.CommandLineArguments);
82-
if (this.useLegacyProtocol)
83-
{
84-
argsBuilder.Append(" --legacy");
85-
}
86-
8764
return argsBuilder.ToString();
8865
}
8966
}

dotnet/test/chrome/ChromeSpecificTests.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,5 @@ public void RunAfterAnyTests()
1313
EnvironmentManager.Instance.CloseCurrentDriver();
1414
EnvironmentManager.Instance.WebServer.Stop();
1515
}
16-
17-
[Test]
18-
public void W3CFalse()
19-
{
20-
Assert.Throws<ArgumentException>(() => new ChromeOptions
21-
{
22-
UseSpecCompliantProtocol = false
23-
});
24-
}
2516
}
2617
}

0 commit comments

Comments
 (0)