UIAutomation在iOS 6中工作,但在iOS 7中不工作(uiataTarget.setLocationWithOptions)

UIAutomation在iOS 6中工作,但在iOS 7中不工作(uiataTarget.setLocationWithOptions),ios,xcode,ios7,qa,ios-ui-automation,Ios,Xcode,Ios7,Qa,Ios Ui Automation,我尝试为基于位置的应用程序编写UIAutomation测试。这是我的密码: var target = UIATarget.localTarget(); var mainWindow = target.frontMostApp().mainWindow(); // speed is in meters/sec var points = [ {"location":{"latitude":46.783959176435,"longitude":23.542576152853}, "o

我尝试为基于位置的应用程序编写UIAutomation测试。这是我的密码:

var target = UIATarget.localTarget();
var mainWindow = target.frontMostApp().mainWindow();  

// speed is in meters/sec 
var points = [
    {"location":{"latitude":46.783959176435,"longitude":23.542576152853}, "options":{"speed":32.33869934082}},
    {"location":{"latitude":46.784235069873,"longitude":23.542993452429}, "options":{"speed":33.44660949707}},
    {"location":{"latitude":46.784323173489,"longitude":23.543161503691}, "options":{"speed":33.76908493042}},
    {"location":{"latitude":46.784514430638,"longitude":23.54344429169}, "options":{"speed":34.434867858887}},
    {"location":{"latitude":46.784609053263,"longitude":23.543600872392}, "options":{"speed":34.673755645752}},
    {"location":{"latitude":46.784701914083,"longitude":23.54376055256}, "options":{"speed":34.920608520508}},
    {"location":{"latitude":46.784792299278,"longitude":23.543917345257}, "options":{"speed":34.939456939697}},
    {"location":{"latitude":46.784869569202,"longitude":23.54409146343}, "options":{"speed":34.837844848633}},
    {"location":{"latitude":46.784959115698,"longitude":23.544272081608}, "options":{"speed":34.80908203125}},
    {"location":{"latitude":46.785085476228,"longitude":23.544603009802}, "options":{"speed":34.722270965576}},
    {"location":{"latitude":46.785085476228,"longitude":23.544603009802}, "options":{"speed":0.0}}
];

var driveDetectionStarted;
for (var i = 0; i < points.length; i++){
    target.setLocationWithOptions(points[i].location,points[i].options); // send location update
    target.delay(0.2); // sleep until next location update
}

target.delay(1);
if (mainWindow.staticTexts()[0].value() == "Updates Received") {
    driveDetectionStarted = true;
}
if (driveDetectionStarted) {
    UIALogger.logPass("Location updates received as expected.");
} else {
    UIALogger.logFail("Location updates logic failed.");
}
var target=uiatatarget.localTarget();
var mainWindow=target.frontMostApp().mainWindow();
//速度以米/秒为单位
变量点=[
{“位置”:{“纬度”:46.783959176435,“经度”:23.542576152853},“选项”:{“速度”:32.33869934082},
{“位置”:{“纬度”:46.784235069873,“经度”:23.542993452429},“选项”:{“速度”:33.44660949707},
{“位置”:{“纬度”:46.784323173489,“经度”:23.543161503691},“选项”:{“速度”:33.76908493042},
{“位置”:{“纬度”:46.784514430638,“经度”:23.54344429169},“选项”:{“速度”:34.434867858887},
{“位置”:{“纬度”:46.784609053263,“经度”:23.543600872392},“选项”:{“速度”:34.673755645752},
{“位置”:{“纬度”:46.784701914083,“经度”:23.5437605526},“选项”:{“速度”:34.92060520508},
{“位置”:{“纬度”:46.784792299278,“经度”:23.543917345257},“选项”:{“速度”:34.939456939697},
{“位置”:{“纬度”:46.784869569202,“经度”:23.54409146343},“选项”:{“速度”:34.837844848633},
{“位置”:{“纬度”:46.784959115698,“经度”:23.544272081608},“选项”:{“速度”:34.80908203125},
{“位置”:{“纬度”:46.785085476228,“经度”:23.544603009802},“选项”:{“速度”:34.722270965576},
{“位置”:{“纬度”:46.785085476228,“经度”:23.544603009802},“选项”:{“速度”:0.0}
];
var-driveDetectionStarted;
对于(变量i=0;i
应用程序必须接收位置更新,如果一切正常,则会显示一个带有“已接收更新”文本的UILabel。此测试在iOS 6上运行,但在iOS 7上我没有收到位置更新。我在设备上试过,因为target.delay(x)方法在使用新xcode的模拟器中不起作用。(我已经测试过了,它在旧的xcode版本中工作。)

有人能帮我在iOS 7上运行测试吗?有人面临同样的问题吗?(我计划编写更复杂的测试,但如果我没有收到位置更新,我将无法继续。)


谢谢

我这里也有同样的问题。setLocation()和setLocationWithOptions()方法在iOS 7上不起作用。文档中缺少UIATarget的所有方法(在iOS 7之前可用),修订历史中没有这些更改的条目

我向苹果公司提交了一份雷达文件雷达#17838015-仍然无法在iOS 8 Beta中工作。在8.0 SDK的Beta(3,4,5)上尝试,但无法工作。令人沮丧的。