Implemented mouse and session commands
ADD
commands-yml/commands/interactions/mouse/button-down.yml
+---
+name: Button Down
+short_description: Click and hold the left mouse button at the current mouse coordinates
+
+description:
+ |
+ Note that the next mouse-related command that should follow is buttonup . Any other mouse command (such as click or another call to buttondown) will yield undefined behavior
+
+example_usage:
+ java:
+ |
+ Actions action = new Actions(driver);
+ action.moveTo(element);
+ action.clickAndHold();
+ action.perform();
+ python:
+ |
+ actions = ActionChains(driver)
+ actions.move_to_element(element)
+ actions.click_and_hold()
+ actions.perform()
+ javascript_wd:
+ |
+ await driver.moveTo(element);
+ await driver.buttonDown();
+
+ javascript_wdio:
+ |
+ driver.moveTo(element)
+ .buttonDown();
+ ruby:
+ |
+ @driver.action.move_to(element).click_and_hold.perform
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html#clickAndHold--"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.common.action_chains.ActionChains.click_and_hold"
+ javascript_wdio: "http://webdriver.io/api/protocol/buttonDown.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1625"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/ActionBuilder:click_and_hold"
+ 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: true # TODO Confirm this that mouse movements
+ windows:
+ windows: true # TODO Confirm this
+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/buttondown
+ method: POST
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ json_parameters:
+ - name: button
+ type: number
+ description: Which button, {LEFT = 0, MIDDLE = 1 , RIGHT = 2}. Defaults to the left mouse button if not specified
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidbuttondown

ADD
commands-yml/commands/interactions/mouse/button-up.yml
+---
+name: Button Up
+short_description: Releases the mouse button previously held
+
+description:
+ |
+ Must be called once for every buttondown command issued. See the note in click and buttondown about implications of out-of-order commands.
+
+example_usage:
+ java:
+ |
+ Actions action = new Actions(driver);
+ action.moveTo(element);
+ action.clickAndHold();
+ action.moveTo(element, 10, 10);
+ action.release();
+ action.perform();
+ python:
+ |
+ actions = ActionChains(driver)
+ actions.move_to_element(element)
+ actions.click_and_hold()
+ actions.move_to_element(element, 10, 10)
+ action.release();
+ actions.perform()
+ javascript_wd:
+ |
+ await driver.moveTo(element);
+ await driver.buttonDown();
+ await driver.moveTo(element, 10, 10);
+ await driver.buttonUp();
+
+ javascript_wdio:
+ |
+ driver.moveTo(element)
+ .buttonDown()
+ .moveTo(element, 10, 10)
+ .buttonUp();
+ ruby:
+ |
+ @driver.action.click_and_hold(el).move_to(el, 10, 10).release.perform
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html#clickAndHold--"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.common.action_chains.ActionChains.release"
+ javascript_wdio: "http://webdriver.io/api/protocol/buttonUp.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1645"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/ActionBuilder:release"
+ 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: true # TODO Confirm this that mouse movements
+ windows:
+ windows: true # TODO Confirm this
+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/buttonup
+ method: POST
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ json_parameters:
+ - name: button
+ type: number
+ description: Which button, {LEFT = 0, MIDDLE = 1 , RIGHT = 2}. Defaults to the left mouse button if not specified
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidbuttonup

ADD
commands-yml/commands/interactions/mouse/click.yml
+---
+name: Click
+short_description: Click any mouse button at the current mouse coordinates
+
+example_usage:
+ java:
+ |
+ Actions action = new Actions(driver);
+ action.moveTo(element);
+ action.click();
+ action.perform();
+ python:
+ |
+ actions = ActionChains(driver)
+ actions.move_to_element(element)
+ actions.click()
+ actions.perform()
+ javascript_wd:
+ |
+ await driver.moveTo(element);
+ await driver.click();
+
+ javascript_wdio:
+ |
+ driver.moveTo(element)
+ .click();
+ ruby:
+ |
+ @driver.action.move_to(element).click.perform
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html#click--"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.common.action_chains.ActionChains.click"
+ javascript_wdio: "http://webdriver.io/api/action/click.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1665"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Mouse:click"
+ 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: true # TODO Confirm this that mouse movements
+ windows:
+ windows: true # TODO Confirm this
+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/click
+ method: POST
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ json_parameters:
+ - name: button
+ type: number
+ description: Which button, {LEFT = 0, MIDDLE = 1 , RIGHT = 2}. Defaults to the left mouse button if not specified
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidclick

ADD
commands-yml/commands/interactions/mouse/moveto.yml
+---
+name: Set Orientation
+short_description: Move the mouse by an offset of the specificed element
+
+description:
+ |
+ If no element is specified, the move is relative to the current mouse cursor. If an element is provided but no offset, the mouse will be moved to the center of the element. If the element is not visible, it will be scrolled into view.
+
+example_usage:
+ java:
+ |
+ Actions action = new Actions(driver);
+ action.moveTo(element, 10, 10);
+ python:
+ |
+ driver.move_to(element, 10, 10)
+ javascript_wd:
+ |
+ await driver.moveTo(element, 10, 10);
+
+ javascript_wdio:
+ |
+ driver.moveTo(element, 10, 10);
+ ruby:
+ |
+ @driver.mouse.move_to(element)
+ @driver.mouse.move_to(element, 5, 5)
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html#moveToElement-org.openqa.selenium.WebElement-"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.common.action_chains.ActionChains.move_to_element"
+ javascript_wdio: "http://webdriver.io/api/protocol/moveTo.html#description"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1600"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Mouse:move_to"
+ 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: true # TODO Confirm this that mouse movements
+ windows:
+ windows: true # TODO Confirm this
+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/moveto
+ method: POST
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ json_parameters:
+ - name: element
+ type: string
+ description: The ID of the element to move to. If not specified, relative to mouse position
+ - name: xoffset
+ type: number
+ description: X offset to move to, relative to the top-left corner of the element. If not specified, the mouse will move to the middle of the element
+ - name: yoffset
+ type: number
+ description: Y offset to move to, relative to the top-left corner of the element. If not specified, the mouse will move to the middle of the element
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ w3c: https://drafts.csswg.org/cssom-view/#dom-window-moveto
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidmoveto

MODIFY
commands-yml/commands/session/get.yml
commands-yml/commands/session/get.yml
@@ -18,7 +18,7 @@ example_usage:
let caps = driver.session('c8db88a0-47a6-47a1-802d-164d746c06aa');
ruby:
|
- # Private method. Do not use.
+ @driver.session_capabilities()
php:
|
// TODO PHP sample

ADD
commands-yml/commands/session/other/get-orientation.yml
+---
+name: Get Orientation
+short_description: Get the current device/browser orientation
+
+example_usage:
+ java:
+ |
+ ScreenOrientation orientation = driver.getOrientation();
+ python:
+ |
+ orientation = self.driver.orientation()
+ javascript_wd:
+ |
+ let orientation = await driver.getOrientation();
+
+ javascript_wdio:
+ |
+ let orientation = driver.orientation();
+ ruby:
+ |
+ @driver.orientation()
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/Rotatable.html#getOrientation--"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.orientation"
+ javascript_wdio: "http://webdriver.io/api/mobile/orientation.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2021"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/DriverExtensions/Rotatable:orientation"
+ 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/orientation
+ method: GET
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ response:
+ - type: string
+ description: The current browser orientation {LANDSCAPE|PORTRAIT}
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidorientation

ADD
commands-yml/commands/session/other/set-orientation.yml
+---
+name: Set Orientation
+short_description: Set the current device/browser orientation
+
+example_usage:
+ java:
+ |
+ ScreenOrientation orientation = driver.rotate(ScreenOrientation.LANDSCAPE);
+ python:
+ |
+ driver.orientation = "LANDSCAPE"
+ javascript_wd:
+ |
+ await driver.setOrientation();
+
+ javascript_wdio:
+ |
+ driver.orientation("LANDSCAPE");
+ ruby:
+ |
+ @driver.orientation("LANDSCAPE")
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/Rotatable.html#rotate-org.openqa.selenium.DeviceRotation-"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.orientation"
+ javascript_wdio: "http://webdriver.io/api/mobile/orientation.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2035"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/DriverExtensions/Rotatable:orientation"
+ 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: false # TODO Confirm this
+ windows:
+ windows: true # TODO Confirm this
+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/orientation
+ method: GET
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ response:
+ - type: string
+ description: The current browser orientation {LANDSCAPE|PORTRAIT}
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidorientation

ADD
commands-yml/commands/session/source.yml
+---
+name: Get Page Source
+short_description: Get the current application hierarchy XML (app) or page source (web)
+
+description:
+ |
+ In a web context, the source returns the source HTML of the current window. In a native context (iOS, Android, etc...) it will return the application hierarchy XML.
+
+ This method is useful for inspecting your application hierarchy and using that to write [selectors](/docs/en/commands/element/find-element.md)
+
+ (NOTE: iOS and Android don't have standard ways of defining their application source, so on calls to 'Get Page Source' Appium traverses the app hierarchy
+ and creates an XML document. Thus, getting the source can oftentime be an expensive and time-consuming operation)
+
+example_usage:
+ java:
+ |
+ String pageSource = driver.getPageSource();
+ python:
+ |
+ source = self.driver.page_source()
+ javascript_wd:
+ |
+ let pageSource = await driver.source();
+ javascript_wdio:
+ |
+ let source = driver.source();
+ ruby:
+ |
+ @driver.page_source
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/RemoteWebDriver.html#getPageSource--"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.page_source"
+ javascript_wdio: "http://webdriver.io/api/protocol/source.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1808"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Driver:page_source"
+ 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: /wd/hub/session/:session_id/source
+ method: GET
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ w3c: https://www.w3.org/TR/webdriver/#dfn-get-page-source
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidsource

ADD
commands-yml/commands/web/storage/delete-all-cookies.yml
+---
+name: Delete All Cookies
+short_description: Delete all cookies visible to current page (Web context only)
+
+example_usage:
+ java:
+ |
+ driver.manage().deleteAllCookies();
+ python:
+ |
+ self.driver.delete_all_cookies()
+ javascript_wd:
+ |
+ await driver.deleteAllCookies();
+ javascript_wdio:
+ |
+ driver.cookie("delete");
+ ruby:
+ |
+ @driver.delete_all_cookies()
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/RemoteWebDriver.RemoteWebDriverOptions.html#deleteAllCookies--"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.delete_all_cookies"
+ javascript_wdio: "http://webdriver.io/api/cookie/deleteCookie.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1993"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Options:delete_all_cookies"
+ 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: false
+ python: false
+ ruby: false
+ php: false
+ csharp: false
+ javascript_wd: false
+ javascript_wdio: false
+
+
+# Information about the HTTP endpoints
+endpoint:
+ url: /wd/hub/session/:sessionId/cookie
+ method: DELETE
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ w3c: https://www.w3.org/TR/webdriver/#dfn-delete-all-cookies
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#delete-sessionsessionidcookie

ADD
commands-yml/commands/web/storage/delete-cookie.yml
+---
+name: Delete Cookie
+short_description: Delete the cookie with the given name (Web context only)
+
+example_usage:
+ java:
+ |
+ driver.manage().deleteCookieNamed("cookie_name");
+ python:
+ |
+ self.driver.delete_cookie("cookie_name")
+ javascript_wd:
+ |
+ await driver.deleteCookie("cookie_name");
+ javascript_wdio:
+ |
+ driver.cookie("delete", "cookie_name");
+ ruby:
+ |
+ @driver.delete_cookie("cookie_name")
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/RemoteWebDriver.RemoteWebDriverOptions.html#deleteCookieNamed-java.lang.String-"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.delete_cookie"
+ javascript_wdio: "http://webdriver.io/api/cookie/deleteCookie.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2007"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Options:delete_cookie"
+ 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: false
+ python: false
+ ruby: false
+ php: false
+ csharp: false
+ javascript_wd: false
+ javascript_wdio: false
+
+
+# Information about the HTTP endpoints
+endpoint:
+ url: /wd/hub/session/:sessionId/cookie/:name
+ method: DELETE
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ - name: name
+ description: Name of cookie to delete
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ w3c: https://www.w3.org/TR/webdriver/#dfn-delete-cookie
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidcookiename

ADD
commands-yml/commands/web/storage/get-all-cookies.yml
+---
+name: Get All Cookies
+short_description: Retrieve all cookies visible to the current page (Web context only)
+
+example_usage:
+ java:
+ |
+ Set<Cookie> allcookies = driver.manage().getCookies();
+ python:
+ |
+ cookies = self.driver.get_cookies()
+ javascript_wd:
+ |
+ let cookies = await driver.allCookies();
+ javascript_wdio:
+ |
+ let cookies = driver.cookie();
+ ruby:
+ |
+ @driver.all_cookies
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/RemoteWebDriver.RemoteWebDriverOptions.html#getCookies--"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.get_cookies"
+ javascript_wdio: "http://webdriver.io/api/protocol/cookie.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1957"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Options:all_cookies"
+ 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: false
+ python: false
+ ruby: false
+ php: false
+ csharp: false
+ javascript_wd: false
+ javascript_wdio: false
+
+
+# Information about the HTTP endpoints
+endpoint:
+ url: /wd/hub/session/:sessionId/cookie
+ method: GET
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ response:
+ - type: array<object>
+ description: A list of cookies
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ w3c: https://www.w3.org/TR/webdriver/#dfn-get-all-cookies
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidcookie

ADD
commands-yml/commands/web/storage/set-cookie.yml
+---
+name: Set Cookie
+short_description: Set a cookie (Web context only)
+
+example_usage:
+ java:
+ |
+ driver.manage().addCookie(new Cookie("foo", "bar"));
+ python:
+ |
+ self.driver.add_cookie({name: 'foo', value: 'bar'})
+ javascript_wd:
+ |
+ let cookies = await driver.setCookie({name: 'foo', value: 'bar'});
+ javascript_wdio:
+ |
+ driver.cookie('post', {
+ name: 'myCookie',
+ value: 'some content'
+ });
+ ruby:
+ |
+ @driver.add_cookie(:name => 'foo', :value => 'bar')
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/RemoteWebDriver.RemoteWebDriverOptions.html#addCookie-org.openqa.selenium.Cookie-"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.add_cookie"
+ javascript_wdio: "http://webdriver.io/api/protocol/cookie.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1971"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Options:add_cookie"
+ 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: false
+ python: false
+ ruby: false
+ php: false
+ csharp: false
+ javascript_wd: false
+ javascript_wdio: false
+
+
+# Information about the HTTP endpoints
+endpoint:
+ url: /wd/hub/session/:sessionId/cookie
+ method: POST
+ url_parameters:
+ - name: session_id
+ description: ID of the session to route the command to
+ json_parameters:
+ - type: object
+ description: The cookie to add
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ w3c: https://www.w3.org/TR/webdriver/#dfn-delete-cookie
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidcookie

ADD
commands-yml/commands/web/window/title.yml
+---
+name: Get Title
+short_description: Get the current page title (Web context only)
+
+example_usage:
+ java:
+ |
+ String title = driver.getTitle();
+ python:
+ |
+ title = self.driver.title()
+ javascript_wd:
+ |
+ let title = await driver.title();
+ javascript_wdio:
+ |
+ let handle = driver.title();
+ ruby:
+ |
+ @driver.title
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/RemoteWebDriver.html#getTitle--"
+ python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.title"
+ javascript_wdio: "http://webdriver.io/api/protocol/title.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1794"
+ ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Driver:title"
+ 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: false
+ python: false
+ ruby: false
+ php: false
+ csharp: false
+ javascript_wd: false
+ javascript_wdio: false
+
+
+# Information about the HTTP endpoints
+endpoint:
+ url: /wd/hub/session/:session_id/title
+ method: GET
+ response:
+ - type: string
+ description: The current page title
+
+# Links to specifications. Should link to at least one specification
+specifications:
+ w3c: https://www.w3.org/TR/webdriver/#dfn-get-title
+ jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtitle

MODIFY
docs/toc.js
docs/toc.js
@@ -21,13 +21,16 @@ module.exports = {
["Create", "create.md"],
["Delete", "delete.md"],
["Get Session Capabilities", "get.md"],
+ ["Go Back", "back.md"],
+ ["Screenshot", "screenshot.md"],
["Timeouts", ["timeouts",
["Timeout", "timeout.md"],
["Implicit Wait", "implicit-wait.md"],
["Async Script", "async-script.md"],
]],
- ["Go Back", "back.md"],
- ["Screenshot", "screenshot.md"],
+ ["Other", ["other",
+ ["Get Orientation", "get-orientation"],
+ ]],
]],
["Element", ["element",
["Find Element", "find-element.md"],
@@ -61,14 +64,23 @@ module.exports = {
["Get All Contexts", "get-contexts.md"],
["Set Context", "set-context.md"],
]],
+ ["Interactions", ["interactions",
+ ["Move To", "moveto.md"],
+ ["Click", "click.md"],
+ ["Button Down", "buttondown.md"],
+ ["Button Up", "buttonup.md"],
+ ]],
["Web", ["web",
["Window", ["window",
+ ["Set Window", "set-window.md"],
+ ["Close Window", "close-window.md"],
["Get Handle", "get-handle.md"],
["Get Handles", "get-handles.md"],
["Set Window", "set-window.md"],
["Close Window", "close-window.md"],
["Get Handle", "get-handle.md"],
["Get Handles", "get-handles.md"],
+ ["Get Title", "title.md"],
["Get Window Size", "get-window-size.md"],
["Set Window Size", "set-window-size.md"],
["Get Window Position", "get-window-position.md"],
@@ -82,6 +94,12 @@ module.exports = {
["Forward", "forward.md"],
["Refresh", "refresh.md"],
]],
+ ["Storage", ["storage",
+ ["Get All Cookies", "get-all-cookies.md"],
+ ["Set Cookie", "set-cookie.md"],
+ ["Delete Cookie", "delete-cookie.md"],
+ ["Delete All Cookies", "delete-all-cookies.md"],
+ ]],
["Frame", ["frame",
["Switch to Frame", "switch.md"],
["Switch to Parent Frame", "parent.md"],

Implemented mouse and session commands (#9354)