Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(revert): element(locator).then should not appear in the docs and …
Browse files Browse the repository at this point in the history
…change reverted. (#3808)

- change comments to not be in JSDoc format
- reverts change `element(locator).then`
  • Loading branch information
cnishina authored Dec 9, 2016
1 parent 81a6eaa commit c3978ec
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions lib/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -787,21 +787,7 @@ export class ElementArrayFinder extends WebdriverWebElement {
export class ElementFinder extends WebdriverWebElement {
parentElementArrayFinder: ElementArrayFinder;
elementArrayFinder_: ElementArrayFinder;

/**
* Access the underlying actionResult of ElementFinder.
*
* @alias element(locator).then(thenFunction)
* @param {function(webdriver.promise.Promise)} fn Function which takes
* the value of the underlying actionResult.
* @param {function(Error)} errorFn
*
* @returns {webdriver.promise.Promise} Promise which contains the results
* of evaluating fn.
*/
then(fn: Function, errorFn?: Function): wdpromise.Promise<any> {
return null;
}
then: (fn: Function, errorFn?: Function) => wdpromise.Promise<any> = null;

constructor(public browser_: ProtractorBrowser, elementArrayFinder: ElementArrayFinder) {
super();
Expand All @@ -813,6 +799,7 @@ export class ElementFinder extends WebdriverWebElement {
// Only have a `then` method if the parent element array finder
// has action results.
if (this.parentElementArrayFinder.actionResults_) {
// Access the underlying actionResult of ElementFinder.
this.then =
(fn: (value: any) => {} | wdpromise.IThenable<{}>, errorFn?: (error: any) => any) => {
return this.elementArrayFinder_.then((actionResults: any) => {
Expand Down

0 comments on commit c3978ec

Please sign in to comment.