Skip to content

Commit efb8e97

Browse files
committed
chore: remove obsolete v4 functionality
1 parent bf4b4a1 commit efb8e97

File tree

7 files changed

+4
-33
lines changed

7 files changed

+4
-33
lines changed

src/Appium.Net/Appium/AppiumDriver.cs

-6
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,6 @@ public void BackgroundApp() =>
185185
Execute(AppiumDriverCommand.BackgroundApp,
186186
AppiumCommandExecutionHelper.PrepareArgument("seconds", -1));
187187

188-
[Obsolete(
189-
"This method is obsolete & will be removed in the next major release. Call BackgroundApp(TimeSpan) instead.")]
190-
public void BackgroundApp(int seconds) =>
191-
Execute(AppiumDriverCommand.BackgroundApp,
192-
AppiumCommandExecutionHelper.PrepareArgument("seconds", seconds));
193-
194188
public void BackgroundApp(TimeSpan timeSpan) =>
195189
Execute(AppiumDriverCommand.BackgroundApp,
196190
AppiumCommandExecutionHelper.PrepareArgument("seconds", timeSpan.TotalSeconds));

src/Appium.Net/Appium/Enums/AndroidMobileCapabilityType.cs

-4
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,6 @@ public sealed class AndroidMobileCapabilityType
201201
*/
202202
public static readonly string RECREATE_CHROME_DRIVER_SESSIONS = "recreateChromeDriverSessions";
203203

204-
[System.Obsolete("Support for Selendroid is deprecated and will be removed in the next release")]
205-
public static readonly string
206-
SELENDROID_PORT = "selendroidPort";
207-
208204
/// <summary>
209205
/// In a web context, use native (adb) method for taking a screenshot, rather than proxying
210206
/// to ChromeDriver, default false.

src/Appium.Net/Appium/Enums/AutomationName.cs

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ namespace OpenQA.Selenium.Appium.Enums
1919
public sealed class AutomationName
2020
{
2121
public static readonly string Appium = "Appium";
22-
[Obsolete("Support for Selendroid is deprecated and will be removed in the next release")]
23-
public static readonly string Selendroid = "Selendroid";
2422
public static readonly string iOSXcuiTest = "XCuiTest";
2523
public static readonly string AndroidUIAutomator2 = "UIAutomator2";
2624
public static readonly string AndroidEspresso = "Espresso";

src/Appium.Net/Appium/Interfaces/IInteractsWithApps.cs

-6
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ public interface IInteractsWithApps : IExecuteMethod
4747
/// </summary>
4848
void BackgroundApp();
4949

50-
/// <summary>
51-
/// Backgrounds the current app for the given number of seconds or deactivates app completely if negative number is given.
52-
/// </summary>
53-
/// <param name="seconds">an integer number containing the number of seconds.</param>
54-
void BackgroundApp(int seconds);
55-
5650
/// <summary>
5751
/// Backgrounds the current app for the given number of seconds or deactivates app completely if negative number is given.
5852
/// </summary>

src/Appium.Net/Appium/Service/Options/AndroidOptionList.cs

-11
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,6 @@ public sealed class AndroidOptionList : BaseOptionList
3434
public static KeyValuePair<string, string> BootstrapPort(string value) =>
3535
GetKeyValuePairUsingDefaultValue("--bootstrap-port", value, "4724");
3636

37-
38-
///<summary>
39-
/// Local port used for communication with Selendroid<br/>
40-
/// Sample:<br/>
41-
/// --selendroid-port 8080
42-
///</summary>
43-
///
44-
[Obsolete("Support for Selendroid is deprecated and will be removed in the next release")]
45-
public static KeyValuePair<string, string> SelendroidPort(string value) =>
46-
GetKeyValuePairUsingDefaultValue("--selendroid-port", value, "8080");
47-
4837
///<summary>
4938
/// If set, prevents Appium from killing the adb server
5039
/// instance<br/>

test/integration/Android/Device/AppTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ public void CanBackgroundApp()
7676
public void CanBackgroundAppForSeconds()
7777
{
7878
Assert.DoesNotThrow(
79-
() => _driver.BackgroundApp(5));
79+
() => _driver.BackgroundApp(TimeSpan.FromSeconds(5)));
8080
}
8181

8282
[Test]
8383
public void CanBackgroundAppToDeactivationUsingNegativeSecond()
8484
{
8585
Assert.DoesNotThrow(
86-
() => _driver.BackgroundApp(-1));
86+
() => _driver.BackgroundApp(-TimeSpan.FromSeconds(-1)));
8787
}
8888

8989
#endregion

test/integration/IOS/Device/AppTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void CanBackgroundApp()
8989
public void CanBackgroundAppForSeconds()
9090
{
9191
Assert.DoesNotThrow(
92-
() => _driver.BackgroundApp(5));
92+
() => _driver.BackgroundApp(TimeSpan.FromSeconds(5)));
9393
}
9494

9595
[Test]
@@ -103,7 +103,7 @@ public void CanBackgroundAppForTimeSpan()
103103
public void CanBackgroundAppToDeactivationUsingNegativeSecond()
104104
{
105105
Assert.DoesNotThrow(
106-
() => _driver.BackgroundApp(-1));
106+
() => _driver.BackgroundApp(TimeSpan.FromSeconds(-1)));
107107
Assert.DoesNotThrow(() => _driver.FindElement(MobileBy.AccessibilityId(IosDockElement)));
108108
}
109109

0 commit comments

Comments
 (0)