Skip to content

Commit

Permalink
BREAKING CHANGE: Remove obsolete TouchActions, MultiActions methods (a…
Browse files Browse the repository at this point in the history
…ppium#832)

Co-authored-by: Kazuaki Matsuo <[email protected]>
  • Loading branch information
Dor-bl and KazuCocoa authored Sep 25, 2024
1 parent 9bf7155 commit eb324b7
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 549 deletions.
9 changes: 0 additions & 9 deletions src/Appium.Net/Appium/AppiumCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,6 @@ public class AppiumCommand

#endregion Driver Commands

#region (Deprecated) Touch Commands
// TODO: Remove this region once we deprecate the touch actions
// Please use the W3C Actions instead.
new AppiumCommand(HttpCommandInfo.PostCommand, AppiumDriverCommand.PerformMultiAction,
"/session/{sessionId}/touch/multi/perform"),
new AppiumCommand(HttpCommandInfo.PostCommand, AppiumDriverCommand.PerformTouchAction,
"/session/{sessionId}/touch/perform"),

#endregion (Deprecated) Touch Commands

// Enable W3C Actions on AppiumWebDriver

Expand Down
22 changes: 1 addition & 21 deletions src/Appium.Net/Appium/AppiumDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public abstract class AppiumDriver : WebDriver,
IHasSessionDetails,
IHasLocation,
IHidesKeyboard, IInteractsWithFiles, IFindsByFluentSelector<AppiumElement>,
IInteractsWithApps, IPerformsTouchActions, IRotatable, IContextAware
IInteractsWithApps, IRotatable, IContextAware
{
private const string NativeApp = "NATIVE_APP";

Expand Down Expand Up @@ -386,26 +386,6 @@ public void DeactiveIMEEngine() =>

#endregion Input Method (IME)

#region (Deprecated) Multi Actions
// TODO: Remove this region once we deprecate the touch actions
// Please use the W3C Actions instead.
[Obsolete("Touch Actions are deprecated in W3C spec, please use W3C actions instead")]
public void PerformMultiAction(IMultiAction multiAction)
{
if (multiAction == null) return;
var parameters = multiAction.GetParameters();
Execute(AppiumDriverCommand.PerformMultiAction, parameters);
}
[Obsolete("Touch Actions are deprecated in W3C spec, please use W3C actions instead")]
public void PerformTouchAction(ITouchAction touchAction)
{
if (touchAction == null) return;
var parameters = AppiumCommandExecutionHelper.PrepareArgument("actions", touchAction.GetParameters());
Execute(AppiumDriverCommand.PerformTouchAction, parameters);
}

#endregion (Deprecated) Multi Actions

#region W3C Actions

// Replace or hide the original RemoteWebElement.PerformActions base method so that it does not require
Expand Down
16 changes: 0 additions & 16 deletions src/Appium.Net/Appium/AppiumDriverCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,22 +213,6 @@ public class AppiumDriverCommand

#endregion Appium Specific extensions to JSONWP Commands

#region (Deprecated) TouchActions
// TODO: Remove this region once we deprecate the touch actions
// Please use the W3C Actions instead.

/// <summary>
/// Perform touch action
/// </summary>
public const string PerformTouchAction = "performTouchAction";

/// <summary>
/// Perform multi touch action
/// </summary>
public const string PerformMultiAction = "performMultiTouch";

#endregion (Deprecated) MultiTouchActions

#region W3C Actions

/// <summary>
Expand Down
38 changes: 0 additions & 38 deletions src/Appium.Net/Appium/Interfaces/IPerformsTouchActions.cs

This file was deleted.

98 changes: 0 additions & 98 deletions src/Appium.Net/Appium/MultiAction/MultiAction.cs

This file was deleted.

Loading

0 comments on commit eb324b7

Please sign in to comment.