From 5eb3caab034d0db826b39655546a99ceb392a315 Mon Sep 17 00:00:00 2001 From: titusfortner Date: Wed, 17 Jan 2024 10:23:56 -0600 Subject: [PATCH] [dotnet] remove deprecated DriverService constructors with options parameter --- dotnet/src/webdriver/Chrome/ChromeDriverService.cs | 12 ------------ dotnet/src/webdriver/Edge/EdgeDriverService.cs | 12 ------------ dotnet/src/webdriver/Firefox/FirefoxDriverService.cs | 12 ------------ .../webdriver/IE/InternetExplorerDriverService.cs | 12 ------------ dotnet/src/webdriver/Safari/SafariDriverService.cs | 12 ------------ 5 files changed, 60 deletions(-) diff --git a/dotnet/src/webdriver/Chrome/ChromeDriverService.cs b/dotnet/src/webdriver/Chrome/ChromeDriverService.cs index 4c3bbcd479259..20e2e1d63a68b 100644 --- a/dotnet/src/webdriver/Chrome/ChromeDriverService.cs +++ b/dotnet/src/webdriver/Chrome/ChromeDriverService.cs @@ -56,18 +56,6 @@ public static ChromeDriverService CreateDefaultService() return new ChromeDriverService(null, null, PortUtilities.FindFreePort()); } - /// - /// Creates a default instance of the ChromeDriverService. - /// - /// /// Browser options used to find the correct ChromeDriver binary. - /// A ChromeDriverService that implements default settings. - [Obsolete("CreateDefaultService() now evaluates options in Driver constructor")] - public static ChromeDriverService CreateDefaultService(ChromeOptions options) - { - string fullServicePath = DriverFinder.FullPath(options); - return CreateDefaultService(Path.GetDirectoryName(fullServicePath), Path.GetFileName(fullServicePath)); - } - /// /// Creates a default instance of the ChromeDriverService using a specified path to the ChromeDriver executable. /// diff --git a/dotnet/src/webdriver/Edge/EdgeDriverService.cs b/dotnet/src/webdriver/Edge/EdgeDriverService.cs index c1cbb3641ce0d..65c94a228211c 100644 --- a/dotnet/src/webdriver/Edge/EdgeDriverService.cs +++ b/dotnet/src/webdriver/Edge/EdgeDriverService.cs @@ -65,18 +65,6 @@ public static EdgeDriverService CreateDefaultService() return new EdgeDriverService(null, null, PortUtilities.FindFreePort()); } - /// - /// Creates a default instance of the EdgeDriverService. - /// - /// Browser options used to find the correct MSEdgeDriver binary. - /// A EdgeDriverService that implements default settings. - [Obsolete("CreateDefaultService() now evaluates options in Driver constructor")] - public static EdgeDriverService CreateDefaultService(EdgeOptions options) - { - string fullServicePath = DriverFinder.FullPath(options); - return CreateDefaultService(Path.GetDirectoryName(fullServicePath), Path.GetFileName(fullServicePath)); - } - /// /// Creates a default instance of the EdgeDriverService using a specified path to the EdgeDriver executable. /// diff --git a/dotnet/src/webdriver/Firefox/FirefoxDriverService.cs b/dotnet/src/webdriver/Firefox/FirefoxDriverService.cs index 6345760e83a3d..d6a8fa7f4e528 100644 --- a/dotnet/src/webdriver/Firefox/FirefoxDriverService.cs +++ b/dotnet/src/webdriver/Firefox/FirefoxDriverService.cs @@ -218,18 +218,6 @@ public static FirefoxDriverService CreateDefaultService() } - /// - /// Creates a default instance of the FirefoxDriverService. - /// - /// Browser options used to find the correct GeckoDriver binary. - /// A FirefoxDriverService that implements default settings. - [Obsolete("CreateDefaultService() now evaluates options in Driver constructor")] - public static FirefoxDriverService CreateDefaultService(FirefoxOptions options) - { - string fullServicePath = DriverFinder.FullPath(options); - return CreateDefaultService(Path.GetDirectoryName(fullServicePath), Path.GetFileName(fullServicePath)); - } - /// /// Creates a default instance of the FirefoxDriverService using a specified path to the Firefox driver executable. /// diff --git a/dotnet/src/webdriver/IE/InternetExplorerDriverService.cs b/dotnet/src/webdriver/IE/InternetExplorerDriverService.cs index aa47aabddf3b0..187890ed4633f 100644 --- a/dotnet/src/webdriver/IE/InternetExplorerDriverService.cs +++ b/dotnet/src/webdriver/IE/InternetExplorerDriverService.cs @@ -158,18 +158,6 @@ public static InternetExplorerDriverService CreateDefaultService() return new InternetExplorerDriverService(null, null, PortUtilities.FindFreePort()); } - /// - /// Creates a default instance of the InternetExplorerDriverService. - /// - /// Browser options used to find the correct IEDriver binary. - /// A InternetExplorerDriverService that implements default settings. - [Obsolete("CreateDefaultService() now evaluates options in Driver constructor")] - public static InternetExplorerDriverService CreateDefaultService(InternetExplorerOptions options) - { - string fullServicePath = DriverFinder.FullPath(options); - return CreateDefaultService(Path.GetDirectoryName(fullServicePath), Path.GetFileName(fullServicePath)); - } - /// /// Creates a default instance of the InternetExplorerDriverService using a specified path to the IEDriverServer executable. /// diff --git a/dotnet/src/webdriver/Safari/SafariDriverService.cs b/dotnet/src/webdriver/Safari/SafariDriverService.cs index a111f844a7928..004de2faa9686 100644 --- a/dotnet/src/webdriver/Safari/SafariDriverService.cs +++ b/dotnet/src/webdriver/Safari/SafariDriverService.cs @@ -171,18 +171,6 @@ public static SafariDriverService CreateDefaultService() return new SafariDriverService(null, null, PortUtilities.FindFreePort()); } - /// - /// Creates a default instance of the SafariDriverService. - /// - /// Browser options used to find the correct GeckoDriver binary. - /// A SafariDriverService that implements default settings. - [Obsolete("CreateDefaultService() now evaluates options in Driver constructor")] - public static SafariDriverService CreateDefaultService(SafariOptions options) - { - string fullServicePath = DriverFinder.FullPath(options); - return CreateDefaultService(Path.GetDirectoryName(fullServicePath), Path.GetFileName(fullServicePath)); - } - /// /// Creates a default instance of the SafariDriverService using a specified path to the SafariDriver executable. ///