Skip to content

Instantly share code, notes, and snippets.

@olbrichj
Created November 5, 2017 16:45
Show Gist options
  • Save olbrichj/5f4af96027723057ea7034d9440ef710 to your computer and use it in GitHub Desktop.
Save olbrichj/5f4af96027723057ea7034d9440ef710 to your computer and use it in GitHub Desktop.
func getRandomCoordinate() -> XCUICoordinate {
let x = CGFloat(Float(arc4random()) / Float(UINT32_MAX))
let y = CGFloat(Float(arc4random()) / Float(UINT32_MAX))
let vector = CGVector(dx: x, dy: y)
let coordinate = getCoordinateForVector(vector: vector)
return coordinate
}
coordinate.tap()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment