UNPKG

appium

Version:
83 lines (76 loc) 2.71 kB
--- name: Get Window Position short_description: Get the position of the specified window (Web context only) example_usage: java: | Point windowPosition = driver.manage().window().getPosition(); python: | handle_one_position = self.driver.get_window_position() handle_two_position = self.driver.get_window_position("handleName") javascript_wd: | let handleOnePosition = await driver.getWindowPosition(); let handleTwoPosition = await driver.getWindowPosition("handleName"); javascript_wdio: | let handleOnePosition = driver.windowHandlePosition(); let handleTwoPosition = driver.windowHandlePosition("handleName"); ruby: | @driver.window_position() @driver.window_position("handleName") php: | // TODO PHP sample csharp: | // TODO C# sample client_docs: java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebDriver.Window.html#getPosition--" python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.get_window_position" javascript_wdio: "http://webdriver.io/api/protocol/windowHandlePosition.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L586" ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Remote/W3C/Bridge:window_position" 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: false uiautomation: false android: uiautomator2: false uiautomator: false mac: mac: false windows: windows: false 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/window/:window_handle/position method: GET url_parameters: - name: session_id description: ID of the session to route the command to - name: window_handle description: Handle of the window to get position of. If 'current' it will get position of current window. response: - name: x type: number description: The x coordinate relative to the top left corner of the window - name: y type: number description: The y coordinate relative to the top left corner of the window # Links to specifications. Should link to at least one specification specifications: jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidwindowwindowhandleposition