Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
feat: remove element.submitForm() action method
Browse files Browse the repository at this point in the history
BREAKING CHANGE: element.submitForm() action method removed
  • Loading branch information
clebert committed Jun 7, 2017
1 parent aa71c46 commit 9746e3e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
21 changes: 0 additions & 21 deletions docs/api-reference/interfaces/selenium-element.md
Expand Up @@ -26,7 +26,6 @@
* [`clearValue()`](#action-method-clearvalue)
* [`click()`](#action-method-click)
* [`sendKeys()`](#action-method-sendkeys)
* [`submitForm()`](#action-method-submitform)

### Factory method: `defineDescendantElement()`

Expand Down Expand Up @@ -341,26 +340,6 @@ test('Example', async t => {
*Note: The `WebElement` of selenium-webdriver is used internally, but is not accessible from the outside.*

### Action method: `submitForm()`

> Submit the form containing the element
Type definition:

* **`submitForm(): SeleniumAction`**

Example usage:

```js
const {defineElement, test} = require('cybernaut');

test('Example', async t => {
const element = defineElement('name', 'selector');

await t.perform(element.submitForm());
});
```

[element-displayed]: https://w3c.github.io/webdriver/webdriver-spec.html#dfn-element-displayed
[webdriver-key]: https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/lib/input_exports_Key.html
[webdriver-webelement]: https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebElement.html
11 changes: 0 additions & 11 deletions src/selenium/element.ts
Expand Up @@ -211,17 +211,6 @@ export class SeleniumElement {
};
}

public submitForm(): SeleniumAction {
return {
description: `Submit the form containing the ${this._name} element`,
perform: async driver => {
const element = await this._findElement(driver);

await element.submit();
}
};
}

private async _findElement(driver: WebDriver): Promise<WebElement> {
const element = await this._locateElement(driver);

Expand Down

0 comments on commit 9746e3e

Please sign in to comment.