Skip to content

Commit

Permalink
chore: Removal of deprecated Input value endpoints (#775)
Browse files Browse the repository at this point in the history
* chore: Removal of deprecated Input value endpoints

* chore: Remove deprecated ReplaceValue method from TizenCommandExecutionHelper
  • Loading branch information
Dor-bl authored Apr 13, 2024
1 parent c075891 commit 991e500
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,6 @@ public static bool IsLocked(IExecuteMethod executeMethod) =>
public static void Unlock(IExecuteMethod executeMethod) =>
executeMethod.Execute(AppiumDriverCommand.UnlockDevice);

[Obsolete("The ReplaceValue method is deprecated and will be removed in future versions. Please use the following command extensions: 'mobile: replaceElementValue' instead \r\n See https://github.com/appium/appium-uiautomator2-driver#mobile-replaceelementvalue")]
public static void ReplaceValue(IExecuteMethod executeMethod, string elementId, string value) =>
executeMethod.Execute(AppiumDriverCommand.ReplaceValue,
new Dictionary<string, object>()
{["id"] = elementId, ["value"] = new string[] {value}});

public static Dictionary<string, object> GetSettings(IExecuteMethod executeMethod) =>
(Dictionary<string, object>) executeMethod.Execute(AppiumDriverCommand.GetSettings).Value;

Expand Down
9 changes: 0 additions & 9 deletions src/Appium.Net/Appium/AppiumCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,6 @@ public class AppiumCommand

#endregion Input Method (IME)

#region (Deprecated) Input value

new AppiumCommand(HttpCommandInfo.PostCommand, AppiumDriverCommand.ReplaceValue,
"/session/{sessionId}/appium/element/{id}/replace_value"),
new AppiumCommand(HttpCommandInfo.PostCommand, AppiumDriverCommand.SetValue,
"/session/{sessionId}/appium/element/{id}/value"),

#endregion (Deprecated) Input value

#region SeassionData

new AppiumCommand(HttpCommandInfo.GetCommand, AppiumDriverCommand.GetSession, "/session/{sessionId}/"),
Expand Down
8 changes: 0 additions & 8 deletions src/Appium.Net/Appium/AppiumDriverCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,6 @@ public class AppiumDriverCommand
/// </summary>
public const string FingerPrint = "fingerPrint";

#region (Deprecated) Input value

public const string ReplaceValue = "replaceValue";

public const string SetValue = "setValue";

#endregion (Deprecated) Input value

public const string GetDeviceTime = "getDeviceTime";

public const string GetSession = "getSession";
Expand Down
8 changes: 0 additions & 8 deletions src/Appium.Net/Appium/AppiumElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,6 @@ protected virtual object CacheValue(string key, Func<object> getter)

#endregion

[Obsolete("The SetImmediateValue method is deprecated and will be removed in future versions. Please use 'SendKeys' instead.")]
public void SetImmediateValue(string value) => Execute(AppiumDriverCommand.SetValue,
new Dictionary<string, object>() { ["id"] = Id, ["value"] = value });

[Obsolete("The ReplaceValue method is deprecated and will be removed in future versions. Please use the following command extensions: 'mobile: replaceElementValue' instead \r\n See https://github.com/appium/appium-uiautomator2-driver#mobile-replaceelementvalue")]
public void ReplaceValue(string value) => Execute(AppiumDriverCommand.ReplaceValue,
new Dictionary<string, object>() { ["id"] = Id, ["value"] = value });

public new Response Execute(string commandName, Dictionary<string, object> parameters) =>
base.Execute(commandName, parameters);

Expand Down
5 changes: 0 additions & 5 deletions src/Appium.Net/Appium/Tizen/TizenCommandExecutionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ namespace OpenQA.Selenium.Appium.Tizen
{
public sealed class TizenCommandExecutionHelper : AppiumCommandExecutionHelper
{
[Obsolete("The ReplaceValue method is deprecated and will be removed in future versions. Please use the following command extensions: 'mobile: replaceElementValue' instead \r\n See https://github.com/appium/appium-uiautomator2-driver#mobile-replaceelementvalue")]
public static void ReplaceValue(IExecuteMethod executeMethod, string elementId, string value) =>
executeMethod.Execute(AppiumDriverCommand.ReplaceValue,
new Dictionary<string, object>()
{ ["id"] = elementId, ["value"] = new string[] { value } });

public static void SetAttribute(IExecuteMethod executeMethod, string elementId, string name, string value)
{
Expand Down

0 comments on commit 991e500

Please sign in to comment.