I am testing a webpage using Robot Framework. The page opens by first asking the user's permission to share his location (the latitude-longitude are used by Google APIs to return some results on the page). The user thus has to press "Share Location" on the permission alert. I have to automate this using Robot. How can I automate granting permission to share my location using Selenium2Library keywords? Thanks for any help!
0
votes
1 Answers
0
votes
For Privacy reasons user is prompted to Allow when geolocation is accessed (usually through JavaScript API) , this can be enabled in the browser and each browser has a way to enable it. For example For FireFox its geo.enabled , check this link for further help https://www.mozilla.org/en-US/firefox/geolocation/ Once this is enabled the user permission is not prompted for & its enabled by default. One way to do it using Robotframework is by using the Create Webdriver keyword and passing the geo preference as init_kwargs , these parameters will be different for ie & chrome, check selenium doc here http://selenium.googlecode.com/git/docs/api/py/api.html