vendredi 29 septembre 2017

How to disable geolocation in Opera with C#?

world!

Need help! Selenium, C#, Opera48. How to disble geolocation in Opera when test is run?

case browser_Opera:
OperaDriverService service = 
OperaDriverService.CreateDefaultService(@"C://Windows/"); //path to 
OperaDriver
OperaOptions options = new OperaOptions();
options.BinaryLocation = @"C://Program Files/Opera/launcher.exe"; //path to 
my Opera browser                                                         

//not working                                        
options.AddUserProfilePreference("Enable geolocation", 
false);
options.AddLocalStatePreference("Enable geolocation", false);

driver = new OperaDriver(service, options);     

Aucun commentaire:

Enregistrer un commentaire