SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

Composite Action Error on Touch Events #5795

Closed lukeis closed 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 5795

I am trying to perform a drag and drop action on a web element using Android Webdriver
.

This is the code 
 mac = driver.findElement(By.id("coherent_id_149"));
          WebElement otherElement = driver.findElement(By.id("coherent_id_70"));
          //TchAct = new TouchActions(driver).dragAndDropBy(mac, -400, 0).release(mac).build();
          //TchAct.perform();
          //Thread.sleep(3000);

          TchAct = new TouchActions(driver).clickAndHold(mac).moveToElement(otherElement).release(mac).build();
          TchAct.perform();
          Thread.sleep(3000);

Below is the trace error that is thrown on running this script.Please help me out with
this.I am getting the same error on running a number of methods like click and Hold,release,drogand
dropby

Please let me know if I am going wrong aor what is the correct way to use these methods?

Android WebDriver 2.021
Windows 7

java.lang.NullPointerException
    at org.openqa.selenium.interactions.internal.MouseAction.moveToLocation(MouseAction.java:48)
    at org.openqa.selenium.interactions.ClickAndHoldAction.perform(ClickAndHoldAction.java:38)
    at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:31)
    at ActionExample.testApple4(ActionExample.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at junit.framework.TestCase.runTest(TestCase.java:168)
    at junit.framework.TestCase.runBare(TestCase.java:134)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:124)
    at junit.framework.TestSuite.runTest(TestSuite.java:243)
    at junit.framework.TestSuite.run(TestSuite.java:238)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Reported by inderpreetsingh31 on 2013-06-19 05:46:01

lukeis commented 8 years ago

Reported by a.u.savchuk on 2013-07-21 13:13:18

lukeis commented 8 years ago
Selenium project no longer supports the AndroidDriver.

Please use Selendroid instead:
http://selendroid.io/webview.html

And log any issues against that project:
https://github.com/selendroid/selendroid/issues

Reported by luke.semerau on 2013-12-26 21:57:36

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 18:17:26