---
name: Submit Form
short_description: Submit a FORM element
description:
  >
     The submit command may also be applied to any element that is a descendant of a FORM element (Web only)

example_usage:
  java:
    |
      MobileElement element = (MobileElement) driver.findElementByClassName("SomeClassName");
      element.submit();
  python:
    |
      el = self.driver.find_element_by_accessibility_id('SomeAccessibilityID')
      el.submit();
  javascript_wd:
    |
      let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
      await element.submit();
  javascript_wdio:
    |
      driver.submitForm("~SomeAccessibilityId");
  ruby:
    |
      element = @driver.find_element :class_name, "someClass"
      element.submit element
  php:
    |
      // TODO PHP sample
  csharp:
    |
      // TODO C# sample

client_docs:
  java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#submit--"
  python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.submit"
  javascript_wdio: "http://webdriver.io/api/action/submitForm.html"
  javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1741"
  ruby: "http://www.rubydoc.info/gems/selenium-webdriver/0.0.28/Selenium/WebDriver/Element#submit-instance_method"
  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
  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/element/:element_id/submit
  method: 'POST'
  url_parameters:
    - name: session_id
      description: ID of the session to route the command to
    - name: element_id
      description: ID of the element to submit

# Links to specifications. Should link to at least one specification
specifications: 
  jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidsubmit
