Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Removal of deprecated Input value endpoints #775

Merged
merged 3 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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