swift - XCTest Fast Swipe -


i'd create custom swipes xctest faster shorten test duration:

public class func swipeleftfast(element:xcuielement) {     customswipe(refelement: element, startcoord: cgvector(dx: 1, dy: 5), endcoord: cgvector(dx: -1, dy: 5)) }   public class func customswipe(refelement:xcuielement, startcoord:cgvector, endcoord:cgvector) {     let swipestartpoint = refelement.coordinate(withnormalizedoffset: startcoord)     let swipeendpoint = refelement.coordinate(withnormalizedoffset: endcoord)     swipestartpoint.press(forduration: 0.1, thendragto: swipeendpoint) } 

however slower default xcuielement swipe api. possible create faster swipes , how can understand vector values used in above code? suppose not concrete screen coordinates , if set them example x:10, x:-10 respectively, swipe slow, if set them x:0.1, x:-0.1 swipe short have effect.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -