I'm currently try to UITest a map and tap on a pin. I 'translated' this code I found here to swift to try it but didn't work:
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;
}
}
I realised that the map element doesn't even have children. The only interaction I've managed to make was the presented here
app.maps.element.pinchWithScale(1.5, velocity: 1)
It works but pinching doesn't test anything, how have you guys UItested maps?