Get Geolocation
Get the current geo location //获取当前地理位置
Example Usage
Java | Location location = driver.location(); // Must be a driver that implements LocationContext |
Python | location = self.driver.location() |
Javascript | // webdriver.io example let location = driver.getGeoLocation(); // wd example let location = await driver.getGeoLocation(); |
Ruby | # ruby_lib example location # ruby_lib_core example @driver.location |
C# | Location location = driver.Location; |
PHP | // TODO PHP sample |
Support
Appium Server
Appium Clients
HTTP API Specifications
Endpoint
GET /session/:session_id/location
URL Parameters
name | description |
---|---|
session_id | ID of the session to route the command to |
JSON Parameters
None
Response
name | type | description |
---|---|---|
latitude | number | The current geolocation latitude |
longitude | number | The current geolocation longitude |
altitude | number | The current geolocation altitude |