UNPKG

appium

Version:
60 lines (53 loc) 1.67 kB
--- name: Get Element Location in View short_description: Determine an element's location on the screen once it has been scrolled into view (mainly an internal command and not supported by all clients) example_usage: javascript_wd: | let element = await driver.elementByAccessibilityId("SomeAccessibilityID"); let location = await element.getLocationInView(); javascript_wdio: | let location = driver.getLocationInView("~SomeAccessibilityId"); client_docs: javascript_wdio: "http://webdriver.io/api/property/getLocationInView.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2189" # TODO: Confirm if all the drivers support this 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: /wd/hub/session/:session_id/elements/:element_id/location_in_view method: GET url_parameters: - name: session_id description: ID of the session to route the command to - name: element_id description: ID of the element to get the location-in-view of response: - name: x type: number description: X coordinate - name: y type: number description: Y coordinate # Links to specifications. Should link to at least one specification specifications: jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidlocation_in_view