错误信息:
point is not within the bounds of the screen (Selenium::WebDriver::Error::JavascriptError)
环境:
appium 1.3.3
ruby_lib 4.1.0
测试对象:
appium 的 iOS demo app TestApp
尝试对 UIAMapView 做 pinch 操作,UIAMapView 的 location 是 {35,83},size 是{250,250},使用 TouchAction 去模拟 pinch,代码如下:
map = find_element :xpath,"//UIAMapView[1]"
puts map.location.x
puts map.location.y
top = Appium::TouchAction.new
top.swipe start_x: 35, start_y: 83, end_x: 65, end_y: 113, duration: 500
bottom = Appium::TouchAction.new
bottom.swipe(start_x: 285,start_y: 333, end_x: 235, end_y: 283, duration: 500)
pinch = Appium::MultiTouch.new
pinch.add top
pinch.add bottom
pinch.perform
我认为代码是对的,为什么会报坐标超出范围,蛋疼。有高手没帮忙看下