I am new to appium and trying to automate my web view in my app. I have added touchend event listener to a div. Now i want to fire this event from appium using touchAction class.
I tired touchAction on sample native app. It works , but it doesn’t work for Web element in my app. What I am doing wrong?
I went through the following posts but i am not able to solve this issue
touch-actions-and-mobile-web/795
having-problems-with-appium-executing-perform/177/17
Here’s the error : -
org.openqa.selenium.WebDriverException: Not yet implemented. Please help us: http://appium.io/get-involved.html (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 6 milliseconds
Build info: version: ‘2.45.0’, revision: ‘5017cb8’, time: ‘2015-02-26 23:59:50’
System info: host: ‘lab-mac-aee074’, ip: ‘10.192.18.170’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.10.3’, java.version: ‘1.8.0_40’
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities [{app=/Users/labuser/Library/Developer/Xcode/DerivedData/x-ebjypaqeckllutepszxlfjpmksnn/Build/Products/Debug-iphonesimulator/x.app, networkConnectionEnabled=false, warnings={}, databaseEnabled=false, deviceName=iPad Air, platform=MAC, desired={app=/Users/labuser/Library/Developer/Xcode/DerivedData/x-ebjypaqeckllutepszxlfjpmksnn/Build/Products/Debug-iphonesimulator/x.app, appium-version=1.0, platformVersion=8.2, platformName=iOS, deviceName=iPad Air}, appium-version=1.0, platformVersion=8.2, webStorageEnabled=false, locationContextEnabled=false, browserName=iOS, takesScreenshot=true, javascriptEnabled=true, platformName=iOS}]
Session ID: 61fee5d5-c57a-4c48-a1c2-15d678774579
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:180)
at io.appium.java_client.AppiumDriver.performTouchAction(AppiumDriver.java:293)
at io.appium.java_client.TouchAction.perform(TouchAction.java:301)
at com.x.x.FirstTest.testLocation(FirstTest.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Here is my code : -
driver.manage().timeouts().implicitlyWait(4, TimeUnit.SECONDS);
Set<String> contextNames = driver.getContextHandles();
for (String contextName : contextNames) {
System.out.println(contextName);
if (contextName.contains("WEBVIEW")){
driver.context(contextName);
}
}
WebElement wb = driver.findElement(By.id("thumb_sample1"));
TouchAction testAction = new TouchAction(driver);
testAction.tap(wb).perform();
I am using the latest version of appium 1.3.7 , java-client 2.2.0 , selenium 2.45.0