使用 XCUI 进行两指旋转
Two finger rotation using XCUI
我有一个测试用例,我必须使用我试图自动化的两个手指手势来旋转地图。我试过使用录音机,但它只记录一次敲击,而不是一次旋转。是否可以使用XCUI框架模拟双指旋转?
尝试使用旋转功能。这是一个旋转的文档:
/*!
* 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)
干杯
我有一个测试用例,我必须使用我试图自动化的两个手指手势来旋转地图。我试过使用录音机,但它只记录一次敲击,而不是一次旋转。是否可以使用XCUI框架模拟双指旋转?
尝试使用旋转功能。这是一个旋转的文档:
/*!
* 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)
干杯