位置偽装できるFirefoxとドライバの関係
基本的にはこの通り
https://qiita.com/M_Ishikawa/items/99fba871221ca1226633
位置偽装できるバージョンは
- ブラウザ:Firefox 57.0.1
- ドライバ : Geckodriver 0.24.0
で確認.ドライバはブラウザの対応バージョンより上位であれば動いた,
- ドライバ 0.19.1,ブラウザ57.0.1 でも動く
- ドライバ 0.19.1,ブラウザ64 では動かなかった
Selenideでのprofileコードはこんな感じで
profile.setPreference("geo.prompt.testing", true);
profile.setPreference("geo.prompt.testing.allow", true);
profile.setPreference("geo.enabled", true);
profile.setPreference("geo.provider.use_corelocation", false);
profile.setPreference("geo.provider.ms-windows-location", false);
profile.setPreference("geo.wifi.uri", "data:application/json,{\"location\": {\"lat\": " + lat + ", \"lng\": " + lng + "}, \"accuracy\": 10.0, \"status\": \"OK\"}");