Appium- Get Geolocation(地理定位)

我不是女神ヾ 2022-11-17 10:20 315阅读 0赞

Get Geolocation

          • Example Usage
          • Support
            • Appium Server
            • Appium Clients
          • HTTP API Specifications
            • Endpoint
            • URL Parameters
            • JSON Parameters
            • Response

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

发表评论

表情:
评论列表 (有 0 条评论,315人围观)

还没有评论,来说两句吧...

相关阅读