我有一个测试案例,我必须使用两个手指手势旋转地图,我试图自动化。我尝试过使用录音机,它只录制一个水龙头,而不是旋转。是否可以使用XCUI框架模拟双指旋转?
答案 0 :(得分:1)
使用旋转功能尝试。这里有一个旋转文件:
/*!
* Sends a rotation gesture with two touches.
*
* The system makes a best effort to synthesize the requested rotation and velocity: absolute accuracy is not guaranteed.
* Some values may not be possible based on the size of the element's frame - these will result in test failures.
*
* @param rotation
* The rotation of the gesture in radians.
*
* @param velocity
* The velocity of the rotation gesture in radians per second.
*/
public func rotate(rotation: CGFloat, withVelocity velocity: CGFloat)
欢呼声