Calabash – Paso Predefinido: Location steps

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

 

Gus Terrera

Apasionado por el agile testing y la ia.

Deja una respuesta