How to disable geo location in Opera with C#?

  • 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
    OperaOptions options = new OperaOptions();
    options.BinaryLocation = @"C://Program Files/Opera/launcher.exe"; //path to
    my Opera browser

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

    driver = new OperaDriver(service, options);

Log in to reply

Looks like your connection to Opera forums was lost, please wait while we try to reconnect.