Author: jhall
Description:
The Mobile team (specifically Jon Robson) would like to add a browser test that can spoof a specific geolocation that we know will returns result on the "Nearby" page (https://en.wikipedia.org/wiki/Special:Nearby)
An initial patch for such a test is in Gerrit: https://gerrit.wikimedia.org/r/#/c/92018/
At least for Firefox, the necessary "about:permissions" site-specific setting can be saved in a custom profile, and it is possible for WebDriver to load an existing profile on demand via simple steps like this:
require 'watir-webdriver'
driver = Watir::Browser.new :firefox, :profile => 'Test for WMF mobile'
driver.goto('http://en.wikipedia.org/wiki/Special:Nearby')
This works fine, but to make the test usable in multiple environments, profiles need to be portable. Unfortunately, the site-specific setting of interest (Boolean "geo") is stored in a SQLite database (permissions.sqlite), which does not seem to make that profile setting very portable.
We need to find a way to make this setting portable, so that a browser test for the "Nearby" page can successfully set geolocation settings AND run in any environment, including Vagrant VMs and Jenkins (CloudBees).
Version: unspecified
Severity: normal
Whiteboard: zfilipin
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=58720