Skip to content

Commit 927e5af

Browse files
committed
[dotnet] remove deprecated AddAdditionalCapability
1 parent 1556e86 commit 927e5af

File tree

8 files changed

+3
-196
lines changed

8 files changed

+3
-196
lines changed

dotnet/src/webdriver/Chromium/ChromiumOptions.cs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -506,58 +506,6 @@ protected void AddAdditionalChromiumOption(string optionName, object optionValue
506506
this.additionalChromeOptions[optionName] = optionValue;
507507
}
508508

509-
/// <summary>
510-
/// Provides a means to add additional capabilities not yet added as type safe options
511-
/// for the Chromium driver.
512-
/// </summary>
513-
/// <param name="capabilityName">The name of the capability to add.</param>
514-
/// <param name="capabilityValue">The value of the capability to add.</param>
515-
/// <exception cref="ArgumentException">
516-
/// thrown when attempting to add a capability for which there is already a type safe option, or
517-
/// when <paramref name="capabilityName"/> is <see langword="null"/> or the empty string.
518-
/// </exception>
519-
/// <remarks>Calling <see cref="AddAdditionalCapability(string, object)"/>
520-
/// where <paramref name="capabilityName"/> has already been added will overwrite the
521-
/// existing value with the new value in <paramref name="capabilityValue"/>.
522-
/// Also, by default, calling this method adds capabilities to the options object passed to
523-
/// chromedriver.exe.</remarks>
524-
[Obsolete("Use the temporary AddAdditionalOption method or the AddAdditionalChromeOption method for adding additional options")]
525-
public override void AddAdditionalCapability(string capabilityName, object capabilityValue)
526-
{
527-
// Add the capability to the chromeOptions object by default. This is to handle
528-
// the 80% case where the chromedriver team adds a new option in chromedriver.exe
529-
// and the bindings have not yet had a type safe option added.
530-
this.AddAdditionalCapability(capabilityName, capabilityValue, false);
531-
}
532-
533-
/// <summary>
534-
/// Provides a means to add additional capabilities not yet added as type safe options
535-
/// for the Chromium driver.
536-
/// </summary>
537-
/// <param name="capabilityName">The name of the capability to add.</param>
538-
/// <param name="capabilityValue">The value of the capability to add.</param>
539-
/// <param name="isGlobalCapability">Indicates whether the capability is to be set as a global
540-
/// capability for the driver instead of a Chromium-specific option.</param>
541-
/// <exception cref="ArgumentException">
542-
/// thrown when attempting to add a capability for which there is already a type safe option, or
543-
/// when <paramref name="capabilityName"/> is <see langword="null"/> or the empty string.
544-
/// </exception>
545-
/// <remarks>Calling <see cref="AddAdditionalCapability(string, object, bool)"/>
546-
/// where <paramref name="capabilityName"/> has already been added will overwrite the
547-
/// existing value with the new value in <paramref name="capabilityValue"/></remarks>
548-
[Obsolete("Use the temporary AddAdditionalOption method or the AddAdditionalChromeOption method for adding additional options")]
549-
public void AddAdditionalCapability(string capabilityName, object capabilityValue, bool isGlobalCapability)
550-
{
551-
if (isGlobalCapability)
552-
{
553-
this.AddAdditionalOption(capabilityName, capabilityValue);
554-
}
555-
else
556-
{
557-
this.AddAdditionalChromiumOption(capabilityName, capabilityValue);
558-
}
559-
}
560-
561509
/// <summary>
562510
/// Returns DesiredCapabilities for Chromium with these options included as
563511
/// capabilities. This does not copy the options. Further changes will be

dotnet/src/webdriver/DriverOptions.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -228,23 +228,6 @@ public virtual void AddAdditionalOption(string optionName, object optionValue)
228228
this.additionalCapabilities[optionName] = optionValue;
229229
}
230230

231-
/// <summary>
232-
/// Provides a means to add additional capabilities not yet added as type safe options
233-
/// for the specific browser driver.
234-
/// </summary>
235-
/// <param name="capabilityName">The name of the capability to add.</param>
236-
/// <param name="capabilityValue">The value of the capability to add.</param>
237-
/// <exception cref="ArgumentException">
238-
/// thrown when attempting to add a capability for which there is already a type safe option, or
239-
/// when <paramref name="capabilityName"/> is <see langword="null"/> or the empty string.
240-
/// </exception>
241-
/// <remarks>Calling <see cref="AddAdditionalCapability(string, object)"/>
242-
/// where <paramref name="capabilityName"/> has already been added will overwrite the
243-
/// existing value with the new value in <paramref name="capabilityValue"/>.
244-
/// </remarks>
245-
[Obsolete("Use the temporary AddAdditionalOption method or the browser-specific method for adding additional options")]
246-
public abstract void AddAdditionalCapability(string capabilityName, object capabilityValue);
247-
248231
/// <summary>
249232
/// Returns the <see cref="ICapabilities"/> for the specific browser driver with these
250233
/// options included as capabilities. This does not copy the options. Further

dotnet/src/webdriver/Firefox/FirefoxOptions.cs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -274,58 +274,6 @@ public void AddAdditionalFirefoxOption(string optionName, object optionValue)
274274
this.additionalFirefoxOptions[optionName] = optionValue;
275275
}
276276

277-
/// <summary>
278-
/// Provides a means to add additional capabilities not yet added as type safe options
279-
/// for the Firefox driver.
280-
/// </summary>
281-
/// <param name="capabilityName">The name of the capability to add.</param>
282-
/// <param name="capabilityValue">The value of the capability to add.</param>
283-
/// <exception cref="ArgumentException">
284-
/// thrown when attempting to add a capability for which there is already a type safe option, or
285-
/// when <paramref name="capabilityName"/> is <see langword="null"/> or the empty string.
286-
/// </exception>
287-
/// <remarks>Calling <see cref="AddAdditionalCapability(string, object)"/>
288-
/// where <paramref name="capabilityName"/> has already been added will overwrite the
289-
/// existing value with the new value in <paramref name="capabilityValue"/>.
290-
/// Also, by default, calling this method adds capabilities to the options object passed to
291-
/// geckodriver.exe.</remarks>
292-
[Obsolete("Use the temporary AddAdditionalOption method or the AddAdditionalFirefoxOption method for adding additional options")]
293-
public override void AddAdditionalCapability(string capabilityName, object capabilityValue)
294-
{
295-
// Add the capability to the FirefoxOptions object by default. This is to handle
296-
// the 80% case where the geckodriver team adds a new option in geckodriver.exe
297-
// and the bindings have not yet had a type safe option added.
298-
this.AddAdditionalFirefoxOption(capabilityName, capabilityValue);
299-
}
300-
301-
/// <summary>
302-
/// Provides a means to add additional capabilities not yet added as type safe options
303-
/// for the Firefox driver.
304-
/// </summary>
305-
/// <param name="capabilityName">The name of the capability to add.</param>
306-
/// <param name="capabilityValue">The value of the capability to add.</param>
307-
/// <param name="isGlobalCapability">Indicates whether the capability is to be set as a global
308-
/// capability for the driver instead of a Firefox-specific option.</param>
309-
/// <exception cref="ArgumentException">
310-
/// thrown when attempting to add a capability for which there is already a type safe option, or
311-
/// when <paramref name="capabilityName"/> is <see langword="null"/> or the empty string.
312-
/// </exception>
313-
/// <remarks>Calling <see cref="AddAdditionalCapability(string, object, bool)"/>
314-
/// where <paramref name="capabilityName"/> has already been added will overwrite the
315-
/// existing value with the new value in <paramref name="capabilityValue"/></remarks>
316-
[Obsolete("Use the temporary AddAdditionalOption method or the AddAdditionalFirefoxOption method for adding additional options")]
317-
public void AddAdditionalCapability(string capabilityName, object capabilityValue, bool isGlobalCapability)
318-
{
319-
if (isGlobalCapability)
320-
{
321-
this.AddAdditionalOption(capabilityName, capabilityValue);
322-
}
323-
else
324-
{
325-
this.AddAdditionalFirefoxOption(capabilityName, capabilityValue);
326-
}
327-
}
328-
329277
/// <summary>
330278
/// Returns DesiredCapabilities for Firefox with these options included as
331279
/// capabilities. This does not copy the options. Further changes will be

dotnet/src/webdriver/IE/InternetExplorerOptions.cs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -339,57 +339,6 @@ public void AddAdditionalInternetExplorerOption(string optionName, object option
339339
this.additionalInternetExplorerOptions[optionName] = optionValue;
340340
}
341341

342-
/// <summary>
343-
/// Provides a means to add additional capabilities not yet added as type safe options
344-
/// for the Internet Explorer driver.
345-
/// </summary>
346-
/// <param name="capabilityName">The name of the capability to add.</param>
347-
/// <param name="capabilityValue">The value of the capability to add.</param>
348-
/// <exception cref="ArgumentException">
349-
/// thrown when attempting to add a capability for which there is already a type safe option, or
350-
/// when <paramref name="capabilityName"/> is <see langword="null"/> or the empty string.
351-
/// </exception>
352-
/// <remarks>Calling <see cref="AddAdditionalCapability(string, object)"/>
353-
/// where <paramref name="capabilityName"/> has already been added will overwrite the
354-
/// existing value with the new value in <paramref name="capabilityValue"/>.
355-
/// Also, by default, calling this method adds capabilities to the options object passed to
356-
/// IEDriverServer.exe.</remarks>
357-
[Obsolete("Use the temporary AddAdditionalOption method or the AddAdditionalInternetExplorerOption method for adding additional options")]
358-
public override void AddAdditionalCapability(string capabilityName, object capabilityValue)
359-
{
360-
// Add the capability to the ieOptions object by default. This is to handle
361-
// the 80% case where the IE driver adds a new option in IEDriverServer.exe
362-
// and the bindings have not yet had a type safe option added.
363-
this.AddAdditionalCapability(capabilityName, capabilityValue, false);
364-
}
365-
366-
/// <summary>
367-
/// Provides a means to add additional capabilities not yet added as type safe options
368-
/// for the Internet Explorer driver.
369-
/// </summary>
370-
/// <param name="capabilityName">The name of the capability to add.</param>
371-
/// <param name="capabilityValue">The value of the capability to add.</param>
372-
/// <param name="isGlobalCapability">Indicates whether the capability is to be set as a global
373-
/// capability for the driver instead of a IE-specific option.</param>
374-
/// <exception cref="ArgumentException">
375-
/// thrown when attempting to add a capability for which there is already a type safe option, or
376-
/// when <paramref name="capabilityName"/> is <see langword="null"/> or the empty string.
377-
/// </exception>
378-
/// <remarks>Calling <see cref="AddAdditionalCapability(string, object, bool)"/> where <paramref name="capabilityName"/>
379-
/// has already been added will overwrite the existing value with the new value in <paramref name="capabilityValue"/></remarks>
380-
[Obsolete("Use the temporary AddAdditionalOption method or the AddAdditionalInternetExplorerOption method for adding additional options")]
381-
public void AddAdditionalCapability(string capabilityName, object capabilityValue, bool isGlobalCapability)
382-
{
383-
if (isGlobalCapability)
384-
{
385-
this.AddAdditionalOption(capabilityName, capabilityValue);
386-
}
387-
else
388-
{
389-
this.AddAdditionalInternetExplorerOption(capabilityName, capabilityValue);
390-
}
391-
}
392-
393342
/// <summary>
394343
/// Returns DesiredCapabilities for IE with these options included as
395344
/// capabilities. This copies the options. Further changes will not be

dotnet/src/webdriver/Safari/SafariOptions.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,6 @@ public bool EnableAutomaticProfiling
8282
set { this.enableAutomaticProfiling = value; }
8383
}
8484

85-
/// <summary>
86-
/// Provides a means to add additional capabilities not yet added as type safe options
87-
/// for the Safari driver.
88-
/// </summary>
89-
/// <param name="capabilityName">The name of the capability to add.</param>
90-
/// <param name="capabilityValue">The value of the capability to add.</param>
91-
/// <exception cref="ArgumentException">
92-
/// thrown when attempting to add a capability for which there is already a type safe option, or
93-
/// when <paramref name="capabilityName"/> is <see langword="null"/> or the empty string.
94-
/// </exception>
95-
/// <remarks>Calling <see cref="AddAdditionalCapability"/> where <paramref name="capabilityName"/>
96-
/// has already been added will overwrite the existing value with the new value in <paramref name="capabilityValue"/></remarks>
97-
[Obsolete("Use the temporary AddAdditionalOption method for adding additional options")]
98-
public override void AddAdditionalCapability(string capabilityName, object capabilityValue)
99-
{
100-
this.AddAdditionalOption(capabilityName, capabilityValue);
101-
}
102-
10385
/// <summary>
10486
/// Returns ICapabilities for Safari with these options included as
10587
/// capabilities. This copies the options. Further changes will not be

dotnet/test/common/PageLoadingTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,7 @@ private void InitLocalDriver(PageLoadStrategy strategy)
460460

461461
private class PageLoadStrategyOptions : DriverOptions
462462
{
463-
[Obsolete]
464-
public override void AddAdditionalCapability(string capabilityName, object capabilityValue)
463+
public override void AddAdditionalOption(string capabilityName, object capabilityValue)
465464
{
466465
}
467466

dotnet/test/common/ProxySettingTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ private void InitLocalDriver(Proxy proxy)
152152

153153
private class ProxyOptions : DriverOptions
154154
{
155-
[Obsolete]
156-
public override void AddAdditionalCapability(string capabilityName, object capabilityValue)
155+
public override void AddAdditionalOption(string capabilityName, object capabilityValue)
157156
{
158157
}
159158

dotnet/test/common/UnexpectedAlertBehaviorTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ private Func<bool> ElementTextToBeEqual(IWebElement resultElement, string expect
108108

109109
public class UnhandledPromptBehaviorOptions : DriverOptions
110110
{
111-
[Obsolete]
112-
public override void AddAdditionalCapability(string capabilityName, object capabilityValue)
111+
public override void AddAdditionalOption(string capabilityName, object capabilityValue)
113112
{
114113
}
115114

0 commit comments

Comments
 (0)