简体   繁体   English

是否可以自动为xcode UI测试设置位置?

[英]Is it possible to set a location automatically for xcode UI testing?

I am currently writing tests for my app on xcode, and was wondering if there is a line of code I could use that would run my tests using an pre determined location service? 我目前正在为xcode上的应用程序编写测试,并且想知道是否有一行代码可以使用预先确定的位置服务运行我的测试? I know it is possible to do it manually by clicking on the arrow when the test is running, but i want it automatically? 我知道可以通过在测试运行时单击箭头手动完成,但我想自动进行吗? I cant find any documentation or similar questions online. 我无法在线找到任何文档或类似问题。

Anyone know of anything? 谁知道什么?

A quick solution to this is going on simulator > Debug > Location > Custom Location > Then add the Lat and long in. 对此的快速解决方案是进行模拟器>调试>位置>自定义位置>然后添加Lat和long。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM