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

Commit c3978ec

Browse files
authored
fix(revert): element(locator).then should not appear in the docs and change reverted. (#3808)
- change comments to not be in JSDoc format - reverts change `element(locator).then`
1 parent 81a6eaa commit c3978ec

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

lib/element.ts

+2-15
Original file line numberDiff line numberDiff line change
@@ -787,21 +787,7 @@ export class ElementArrayFinder extends WebdriverWebElement {
787787
export class ElementFinder extends WebdriverWebElement {
788788
parentElementArrayFinder: ElementArrayFinder;
789789
elementArrayFinder_: ElementArrayFinder;
790-
791-
/**
792-
* Access the underlying actionResult of ElementFinder.
793-
*
794-
* @alias element(locator).then(thenFunction)
795-
* @param {function(webdriver.promise.Promise)} fn Function which takes
796-
* the value of the underlying actionResult.
797-
* @param {function(Error)} errorFn
798-
*
799-
* @returns {webdriver.promise.Promise} Promise which contains the results
800-
* of evaluating fn.
801-
*/
802-
then(fn: Function, errorFn?: Function): wdpromise.Promise<any> {
803-
return null;
804-
}
790+
then: (fn: Function, errorFn?: Function) => wdpromise.Promise<any> = null;
805791

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

0 commit comments

Comments
 (0)