Hello,
I’m trying to make a swipe on Safari on Ipad iOS 8.1, with ruby.
Since “driver.execute_script ‘mobile: swipe’” is depreciate on Appium 1.3.5, I’m trying to use TouchAction, but I’m not able to do use them correctly.
I’m trying Appium::TouchAction.new.swipe( startX: 500, startY:300, endX: 600, endY: 300, duration: 3) and this is what I’ve got :
[4] pry(#)> Appium::TouchAction.new.swipe( startX: 500, startY:300, endX: 600, endY: 300, duration: 3)
=> #<Appium::TouchAction:0x007fdf935ba7a0
@actions=
[{:action=>:press, :options=>{:x=>0, :y=>0}}, {:action=>:wait, :options=>{:ms=>3}}, {:action=>:moveTo, :options=>{:x=>0, :y=>0}}, {:action=>:release}]>
If I had .perform at the end, I’ve got “not yet implemented”.
Same thing for tap :
[8] pry(#)> Appium::TouchAction.new.tap( x: 500, dy:300, duration: 3).perform
Selenium::WebDriver::Error::UnknownError: Not yet implemented. Please help us: http://appium.io/get-involved.html
I really don’t know how to use this ToucAction.
Are they ok for Safaro or Chrome Browser ?
My caps :
capabilities = {
caps: {
‘platformName’ => ‘iOS’,
‘platformVersion’ => ‘8.1’,
‘deviceName’ => ‘iPad Air’,
‘browserName’ => ‘Safari’
},
appium_lib: {
sauce_username: nil, # don’t run on Sauce
sauce_access_key: nil
}
}
@driver_appium = Appium::Driver.new(capabilities)
@driver = @driver_appium.start_driver
Appium.promote_appium_methods Object
I’m sure I’ve got just a little error, thanks for helping me !