I am stuck badly with the following issue, please help me out with a working solution.
For all touch actions I am getting
org.openqa.selenium.WebDriverException: unimplemented command: session/537d48a9dcdfb38a12ff318a302c9a08/touch/scroll Command duration or timeout: 8 milliseconds Build info: version: '2.42.2', revision: '6a6995d31c7c56c340d6f45a76976d43506cd6cc', time: '2014-06-03 10:52:47' System info: host: 'Praveen-Prabhus-MacBook-Pro.local', ip: '192.168.0.42', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.4', java.version: '1.7.0_65' Session ID: bbe122fa-f325-4142-a555-9d2f4ea60e02 Driver info: core.AppiumSwipeableDriver
public class AppiumSwipeableDriver extends AppiumDriver implements HasTouchScreen{
public RemoteTouchScreen touch;
public AppiumSwipeableDriver(URL URL, Capabilities Cap) {
super(URL, Cap);
touch = new RemoteTouchScreen(getExecuteMethod());
}
@Override
public TouchScreen getTouch() {
return touch;
}
}
if(browser.equalsIgnoreCase("android")){
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME,"");
capabilities.setCapability("deviceName","Android");
capabilities.setCapability("device","Android");
capabilities.setCapability("takesScreenshot","true");
capabilities.setCapability("platformName","Android");
capabilities.setCapability("platformVersion","4.4.2");
capabilities.setCapability(CapabilityType.PLATFORM,"Mac");
capabilities.setCapability("appPackage","uk.co.ee.myee");
capabilities.setCapability("appActivity","uk.co.ee.myee.Launcher");
capabilities.setCapability("udid","26d7be7b");
driver = new AppiumSwipeableDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
touch = new TouchActions(driver);
Set<String> contextNames = driver.getContextHandles();
for (String contextName : contextNames) {
if (contextName.contains("WEBVIEW_uk.co.ee.myee")){
driver.context(contextName);
}
}
public boolean TopUpRegisteredCard(){
try{
waitForVisible(By.xpath(OR.getProperty("wblTopUpWidget")),10);
driver.findElement(By.xpath(OR.getProperty("wblTopUpWidget"))).click();
waitForVisible(By.xpath(OR.getProperty("btnTopUpRegisteredCard")),10);
driver.findElement(By.xpath(OR.getProperty("btnTopUpRegisteredCard"))).click();
waitForVisible(By.xpath(OR.getProperty("txtTopUpPaymentAmt")),10);
driver.findElement(By.xpath(OR.getProperty("txtTopUpPaymentAmt"))).sendKeys("10");
driver.findElement(By.xpath(OR.getProperty("txtTopUpCVVNum"))).sendKeys("123");
touch.flick(driver.findElement(By.xpath(OR.getProperty("txtTopUpCVVNum"))),0,-250,1000).perform();
waitForVisible(By.xpath(OR.getProperty("btnTopUpMakePayment")),10);
driver.findElement(By.xpath(OR.getProperty("btnTopUpMakePayment"))).click();
return true;
}catch(Exception e){
ReportTest.error(e.getMessage());
return false;
}
I have also tried with AppiumDriver - TouchAction and that gives me
org.openqa.selenium.UnsupportedCommandException: unknown command: session/9e5f0b55fdfb2c98dd019f44a7bf9c8a/touch/perform
I have ran the same scripts shown above successfully in a Windows machine,but now I have moved my project to a MAC and there after its not functioning as expected.
Please help me to get this fixed