For setting the location of the Test Environment where the Tests are run, we just need to add a pair of Desired Capabilities in the Test Environment. Please check the below article for more details on adding Desired Capabilities - How to use Desired Capabilities in Testsigma?
TABLE OF CONTENTS
Setting Desired Capabilities in different Browsers
Google Chrome
Below given are the Desired Capabilities you need to add in Test Environment to set the location for Chrome Browser:
Name | Data Type | Value |
goog:chromeOptions | String | { "profile.default_content_setting_values.geolocation": 1 } |
geolocation | String | 51.50735, -0.12776, 100 |
You need to keep the first row item as it is. In the second row item, the Value corresponds to the parameters latitude, longitude and altitude, respectively.
The above given value i.e 51.50735, -0.12776, 100 is for 'Trafalgar Square, London'.
Similarly, the value for 'Central Park, NYC, USA' is 40.783840, -73.965550, 33
Firefox
Below given are the Desired Capabilities you need to add in Test Environment to set the location for Firefox Browser:
Name | Data Type | Value |
firefoxprofile | String | {"geo.prompt.testing": true, "geo.prompt.testing.allow": true, "geo.enabled": true, "geo.wifi.uri": "data:application/json, {\"location\": {\"lat\": 34.052235, \"lng\": -118.243683}, \"accuracy\": 100.0}" } |
The Value in location under geo.wifi.uri corresponds to the parameters latitude, longitude and accuracy.
The above given value i.e {"location": {"lat": 34.052235, "lng": -118.243683}, "accuracy": 100.0} is for the location 'Downtown, Los Angeles, California 90012, United States'.
Similarly, the value for the location 'Central Park, NYC, USA' would be {"location": {"lat": 40.783840, "lng": -73.965550}, "accuracy": 100.0}
You may use the below website for getting the latitude and longitude for your desired location from the world map
http://www.mapcoordinates.net/en
Also, we can use the below site to check your current location
https://mycurrentlocation.net/