UI testing: how to set location?

With UI Automation, it was possible to call setLocation to simulate a given set of coordinates. How is this accomplished with XCUITest?


Thanks,

Tres

Would much appreciate an answer to this from Apple as the (very large) company I work for is evaluating automation solutions and I'd really like to advocate for XCUITest but that's going to be a very difficult case to make if it's not possible to set locations.

Apple doesn’t provide formal support via DevForums. If you want an official answer to this, you should open a DTS tech support incident.

On a personal note, I don’t have any useful input to offer here, which is why I didn’t respond earlier.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

You can set the location in the scheme. For custom locations you can create a gpx file and have it use it as well. There is this article is a little old but gives most of the details.


https://blackpixel.com/writing/2013/05/simulating-locations-with-xcode.html

UI testing: how to set location?
 
 
Q