My scenario calls for user giving permission for the app to user his location. This dialog looks different in every browser. How do I go about testing it with Capybara?
I've successfully used this in a Cucumber step definition:
page.execute_script "navigator.geolocation.getCurrentPosition = function(success) { success({coords: {latitude: 50.455755, longitude: 30.511565}}); }"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With