【问题标题】:Calabash-ios - How to set location?Calabash-ios - 如何设置位置?
【发布时间】:2014-03-30 22:25:17
【问题描述】:

我正在尝试使用calabash-ios设置位置,可以使用calabash-ios设置位置吗?

在这里搜索过https://github.com/calabash/calabash-ios/wiki/02-Predefined-steps,一无所获。

-编辑-

我找到了解决办法,有一个方法叫set_location,你只需编辑01_launch.rb文件并使用以下代码:

Before do |scenario|
  @calabash_launcher = Calabash::Cucumber::Launcher.new
  unless @calabash_launcher.calabash_no_launch?
    @calabash_launcher.relaunch
    set_location(latitude: -23.884659, longitude: -46.099488) 
    @calabash_launcher.calabash_notify(self)
  end
end

【问题讨论】:

    标签: ios iphone ios7 calabash


    【解决方案1】:

    您可以使用以下设置位置

    set_location(latitude: #{value}, longitude: #{value}) 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-21
      • 1970-01-01
      • 2018-01-31
      • 1970-01-01
      • 2014-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多