This is a sample app in EmberJS to demonstrate the mocking of browser geolocation in Selenium automation tests.
It is quick - That's it!! Intent is to show the selenium automation tests behaviour.
You will need the following things properly installed on your computer.
git clone <repository-url>
this repositorycd EmberGeolocate
npm install
bower install
ember serve
- Visit your app at http://localhost:4200.
There is a selenium test which sets up the Firefox geckodriver with the suitable values of "geo.wifi.uri" with a mock JSON having Lat-Long values, a response, which otherwise would come from Google or any other geolocating service configured for your browser. You can check the value by typing "about:config" in Firefox address bar and filter "geo.wifi.url" and can manually setup your location if you wish.
For running the selenium test:
npm run setup-geckodriver
npm run clean
npm run test
ember build
(development)ember build --environment production
(production)
This is only a demo app to demonstrate the behaviour of browser geolocation and how you can mock this geolocation to make your Selenium tests behave as the location is the one you specified.