---
name: Set Geolocation
short_description: Set the current geo location
   
example_usage:
  java:
    |
      driver.setLocation(new Location(49, 123, 10)); // Must be a driver that implements LocationContext
  python:
    |
      self.driver.set_location(49, 123, 10)
  javascript_wd:
    |
      let location = await driver.sessionCapabilities('c8db88a0-47a6-47a1-802d-164d746c06aa');

  javascript_wdio:
    |
      driver.location({latitude: 121.21, longitude: 11.56, altitude: 94.23});
  ruby:
    |
      @driver.set_location(121.21, 11.56, 94.23)
  php:
    |
      // TODO PHP sample
  csharp:
    |
      // TODO C# sample

client_docs:
  java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/html5/LocationContext.html#location--"
  python: "http://selenium-python.readthedocs.io/api.html"
  javascript_wdio: "http://webdriver.io/api/protocol/location.html"
  javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L407"
  ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FDriverExtensions%2FHasLocation:set_location"
  php: "https://github.com/appium/php-client/" # TODO PHP documentation link
  csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link

# Driver support by platform
driver_support:
  ios:
    xcuitest: true
    uiautomation: true
  android:
    uiautomator2: true
    uiautomator: true
  mac:
    mac: true
  windows:
    windows: true
client_support:
  java: true
  python: true
  ruby: true
  php: true
  csharp: true
  javascript_wd: true
  javascript_wdio: true
  

# Information about the HTTP endpoints
endpoint:
  url: /session/:session_id/location
  method: POST
  url_parameters:
    - name: session_id
      description: ID of the session to route the command to
  json_parameters:
    - name: latitude
      type: number
      description: The current geolocation latitude
    - name: longitude
      type: number
      description: The current geolocation longitude
    - name: altitude
      type: number
      description: The current geolocation altitude

# Links to specifications. Should link to at least one specification
specifications: 
  jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidlocation
