2016-07-19 9 views
0

Ich habe einen Testfall, wo ich eine Karte mit zwei Fingerbewegungen drehen muss, die ich zu automatisieren versuche. Ich habe versucht, den Recorder zu verwenden, und es zeichnet nur einen Tipp auf, nicht eine Drehung. Ist es möglich, eine Zwei-Finger-Rotation mit dem XCUI-Framework zu simulieren?Zwei-Finger-Rotation mit XCUI

Antwort

1

versuchen Sie es mit der Rotationsfunktion. Hier ist eine Doku eines drehen:

/*! 
    * 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) 

prost

+0

Das ist, was ich früher drehen – Giovanni