+54 911 66509220


21 Jun 2015

Calabash – Paso Predefinido: Location steps

Creado por

Location steps

If you allow your phone to use mocked locations (configured on your device under development settings) and your app has the ACCESS_MOCK_LOCATION permission you can change the perceived location of the device by using any of these steps.

You can change the location any address or named location. This is done using the geocoder gem.

Then /^I am in “([^\”]*)”$/ do |location|
Then /^I am at “([^\”]*)”$/ do |location|
Then /^I go to “([^\”]*)”$/ do |location|
To use a set of concrete GPS cordinates

Then /^I am at ([-+]?[0-9]*\.?[0-9]+), ([-+]?[0-9]*\.?[0-9]+)$/ do |latitude, longitude|
Then /^I go to ([-+]?[0-9]*\.?[0-9]+), ([-+]?[0-9]*\.?[0-9]+)$/ do |latitude, longitude|

Fuente: github.com/calabash


Leave a Reply

Your email address will not be published.

* Copy This Password *

* Type Or Paste Password Here *

28,789 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.