在Xcode中使用UITesting map

时间:2016-02-16 11:14:47

标签: xcode dictionary uitest

我目前正在尝试使用UITest地图并点按针脚。我'翻译'这段代码我发现here快速尝试但不起作用:

XCUIElementQuery * mapContents = [[app.windows elementBoundByIndex: 0] otherElements ];
XCUIElement * pin = nil;
for (XCUIElement * element in mapContents.allElementsBoundByIndex)
{
    CGSize elementSize = [element frame].size;
    if ((elementSize.width == 48) && (elementSize.height == 48))
    {
        pin = element;
        break;
    }
}

我意识到地图元素甚至没有孩子。我设法做的唯一互动是提交的here

app.maps.element.pinchWithScale(1.5, velocity: 1)

它有效但捏不会测试任何东西,你们怎么用UItested地图?

0 个答案:

没有答案