'Submits a form identified by `locator`.
If `locator` is empty, first form in the page will be submitted.
Key attributes for forms are `id` and `name`. See `introduction` for
details about locating elements.'

@keyword
def submit_form(self, locator=None):

    self.info(("Submitting    form    '%s'." % locator))
    if (not locator):
        locator = 'xpath=//form'
    element = self.find_element(locator, tag='form')
    element.submit()
