使用 calabash-android 访问地图 v2

access maps v2 with calabash-android

我目前正在为我们的应用程序评估葫芦。它似乎非常强大,但我还没有找到在我的本机 android 应用程序中访问 Google Map v2 的方法。通过 query 检索地图没有问题,但我没有发现任何关于 Google Maps v2 的操作。然而似乎有某种支持。我在 calabash-android 存储库 calabash-android repository

中找到了一个 MapViewUtils class

有人可以向我解释一下我如何访问 MapView 上的标记吗?

最佳 雅各布

试试这个:

When /^I tap the map marker "([^\"]*)"$/ do | marker_title |
  perform_action('tap_map_marker_by_title', marker_title, 60000)
end

您可以找到支持的 mapView 步骤 here

请注意,由于我的 mapview 在 Fragment 中,所以我自己并没有太多地使用它们,所以我得到了“找不到 MapView!”错误。根据此 link 尚不支持 Fragments 中的 mapViews