dotnet-client icon indicating copy to clipboard operation
dotnet-client copied to clipboard

Drug n drop action

Open pashidlos opened this issue 10 years ago • 4 comments

Hi there!

I'm using code from examples;

ITouchAction touchAction = new TouchAction(driver) 
                .Press (startX, startY)
                .Wait (duration)
                .MoveTo (endX, endY)
                .Release ();
touchAction.Perform();

And i'm getting 'System.NotImplementedException' here (this.Execute):

public void PerformTouchAction(TouchAction touchAction)
        {
            if (null == touchAction)
            {
                return; // do nothing
            }

            var parameters = new Dictionary<string, object>();
            parameters.Add("actions", touchAction.GetParameters());
            this.Execute(AppiumDriverCommand.TouchActionV2Perform, parameters);
        }

What i'm doing wrong?

pashidlos avatar Jun 11 '15 12:06 pashidlos

I had the same problem. As far as I know, all end up in the "Execute" method of the class "RemoteWebDriver", witch is virtual and should be implemented in the "AppiumDriver" class. the problem is this implementation is missing and you get the "Not implemented" exception when trying to use it.

This would affect the touch and multitouch actions and every method that uses "Execute", like Orientation, GetAppString, LockDevice, Rotation, StartActivity, etc.

Does anyone knows if this is the desirable behaviour? Is this a pending work or just a bug of any (weird) kind?

mellamojaja avatar Jun 18 '15 09:06 mellamojaja

I didn't know those methods weren't working. So if this is an issue, it would be a bug, not by design.

On Thu, Jun 18, 2015 at 2:45 AM, mellamojaja [email protected] wrote:

I had the same problem. As far as I know, all end up in the "Execute" method of the class "RemoteWebDriver", witch is virtual and should be implemented in the "AppiumDriver" class. the problem is this implementation is missing and you get the "Not implemented" exception when trying to use it.

This would affect the touch and multitouch actions and every method that uses "Execute", like Orientation, GetAppString, LockDevice, Rotation, StartActivity, etc.

Does anyone knows if this is the desirable behaviour? Is this a pending work or just a bug of any (weird) kind?

— Reply to this email directly or view it on GitHub https://github.com/appium/appium-dotnet-driver/issues/90#issuecomment-113092116 .

Jonahss avatar Jun 18 '15 17:06 Jonahss

The not implemented exception would be since @TikhomirovSergey was talking bout moving functionality out of here into the selenium driver. @TikhomirovSergey might have more insight on this.

Astro03 avatar Jun 19 '15 18:06 Astro03

I found this answer: http://stackoverflow.com/questions/15791962/webdriver-with-touch-events And get my task resolved with jQuery.

Will it be done in appium?

pashidlos avatar Aug 19 '15 09:08 pashidlos

Closing the issue since Touch actions will be deprecated in the upcoming release. Please use W3C actions: http://appium.io/docs/en/commands/interactions/actions/

Dor-bl avatar Nov 13 '22 06:11 Dor-bl