{"action":"created","issue":{"url":"https://api.github.com/repos/appium/appium/issues/6585","repository_url":"https://api.github.com/repos/appium/appium","labels_url":"https://api.github.com/repos/appium/appium/issues/6585/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/6585/comments","events_url":"https://api.github.com/repos/appium/appium/issues/6585/events","html_url":"https://github.com/appium/appium/issues/6585","id":160165618,"number":6585,"title":"Appium routing request \"touch/perform\" to Selendroid makes all TouchAction implemented actions not work","user":{"login":"truebit","id":754906,"avatar_url":"https://avatars.githubusercontent.com/u/754906?v=3","gravatar_id":"","url":"https://api.github.com/users/truebit","html_url":"https://github.com/truebit","followers_url":"https://api.github.com/users/truebit/followers","following_url":"https://api.github.com/users/truebit/following{/other_user}","gists_url":"https://api.github.com/users/truebit/gists{/gist_id}","starred_url":"https://api.github.com/users/truebit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/truebit/subscriptions","organizations_url":"https://api.github.com/users/truebit/orgs","repos_url":"https://api.github.com/users/truebit/repos","events_url":"https://api.github.com/users/truebit/events{/privacy}","received_events_url":"https://api.github.com/users/truebit/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/appium/appium/labels/NeedsTriage","name":"NeedsTriage","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-14T12:12:22Z","updated_at":"2016-06-15T03:37:37Z","closed_at":null,"body":"## The problem\r\nAppium routing request \"touch/perform\" to Selendroid makes all TouchAction implemented actions not work, such like swipe, longpress and dragAndDrop\r\n\r\n## Environment\r\n\r\n* Appium version (or git revision) that exhibits the issue: 1.5.3\r\n* Last Appium version that did not exhibit the issue (if applicable): n/a\r\n* Desktop OS/version used to run Appium: mac osx 10.11\r\n* Node.js version (unless using Appium.app|exe): 6.0.0\r\n\r\n## Details\r\nusing appium java-client: 4.0.0\r\nelement swipe cannot be performed, it uses `AndroidDriver.doSwipe` which uses `TouchAction` to perform. refer to #6578 \r\nthis also happens in longpress with code `new TouchAction(driver).longPress(element).release().perform();`\r\n\r\n- this two actions are performed by `TouchAction`, the underlying request is `/wd/hub/session/:sessionId/touch/perform`, this request could not be recognized by Selendroid.\r\n- in [appium-selendroid-driver  `NO_PROXY`](https://github.com/appium/appium-selendroid-driver/blob/master/lib/driver.js#L27), this request is not excluded.\r\n- but in [selendroid server](https://github.com/selendroid/selendroid/blob/master/selendroid-server/src/main/java/io/selendroid/server/AndroidServlet.java#L55), `touch/perform` request is not implemented\r\n\r\n## Link to Appium logs\r\n\r\nhttps://gist.github.com/truebit/7b09a17b4d0c6cf4fa2abeaf95586ea9\r\n\r\n## Code To Reproduce Issue [ Good To Have ]\r\n`new TouchAction(driver).longPress(element).release().perform();`\r\n`((MobileElement) element).swipe(SwipeElementDirection.UP, durationMs);`"},"comment":{"url":"https://api.github.com/repos/appium/appium/issues/comments/226080031","html_url":"https://github.com/appium/appium/issues/6585#issuecomment-226080031","issue_url":"https://api.github.com/repos/appium/appium/issues/6585","id":226080031,"user":{"login":"truebit","id":754906,"avatar_url":"https://avatars.githubusercontent.com/u/754906?v=3","gravatar_id":"","url":"https://api.github.com/users/truebit","html_url":"https://github.com/truebit","followers_url":"https://api.github.com/users/truebit/followers","following_url":"https://api.github.com/users/truebit/following{/other_user}","gists_url":"https://api.github.com/users/truebit/gists{/gist_id}","starred_url":"https://api.github.com/users/truebit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/truebit/subscriptions","organizations_url":"https://api.github.com/users/truebit/orgs","repos_url":"https://api.github.com/users/truebit/repos","events_url":"https://api.github.com/users/truebit/events{/privacy}","received_events_url":"https://api.github.com/users/truebit/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T03:37:37Z","updated_at":"2016-06-15T03:37:37Z","body":"@mykola-mokhnach `TouchActions` does not work for `longpress` action, it would throw exception:\r\n> java.lang.ClassCastException: io.appium.java_client.android.AndroidDriver cannot be cast to org.openqa.selenium.interactions.HasTouchScreen\r\n> \r\n> \tat org.openqa.selenium.interactions.touch.TouchActions.<init>(TouchActions.java:38)\r\n> \tat com.changba.cabbie.impl.AppiumCabbie.longPressOnElement(AppiumCabbie.java:173)\r\n> \tat com.changba.mobile.uitest.pages.MyChangbaPage.cancelFavWork(MyChangbaPage.java:97)\r\n> \tat com.changba.mobile.uitest.tests.MyChangbaPageTest.afterMethod(MyChangbaPageTest.java:116)\r\n> \tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n> \tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n> \tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n> \tat java.lang.reflect.Method.invoke(Method.java:498)\r\n> \tat org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)\r\n> \tat org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)\r\n> \tat org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)\r\n> \tat org.testng.internal.Invoker.invokeMethod(Invoker.java:707)\r\n> \tat org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)\r\n> \tat org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)\r\n> \tat org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)\r\n> \tat org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)\r\n> \tat org.testng.TestRunner.privateRun(TestRunner.java:782)\r\n> \tat org.testng.TestRunner.run(TestRunner.java:632)\r\n> \tat org.testng.SuiteRunner.runTest(SuiteRunner.java:366)\r\n> \tat org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)\r\n> \tat org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)\r\n> \tat org.testng.SuiteRunner.run(SuiteRunner.java:268)\r\n> \tat org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)\r\n> \tat org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)\r\n> \tat org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)\r\n> \tat org.testng.TestNG.runSuitesLocally(TestNG.java:1169)\r\n> \tat org.testng.TestNG.run(TestNG.java:1064)\r\n> \tat org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:74)\r\n> \tat org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:121)"}}
{"actor":{"display_login":"truebit"}}