Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera

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);