@@ -75,7 +75,7 @@ export interface ElementHelper extends Function {
75
75
*
76
76
* @private
77
77
* @param {Protractor } ptor
78
- * @return {function(webdriver.Locator): ElementFinder }
78
+ * @returns {function(webdriver.Locator): ElementFinder }
79
79
*/
80
80
function buildElementHelper ( browser : Browser ) : ElementHelper {
81
81
let element : ElementHelper = ( locator : Locator ) => {
@@ -298,7 +298,7 @@ export class Browser extends Webdriver {
298
298
*
299
299
* Set by the runner.
300
300
*
301
- * @return {webdriver.promise.Promise } A promise which resolves to the capabilities object.
301
+ * @returns {webdriver.promise.Promise } A promise which resolves to the capabilities object.
302
302
*/
303
303
getProcessedConfig : ( ) => webdriver . promise . Promise ;
304
304
@@ -309,7 +309,7 @@ export class Browser extends Webdriver {
309
309
*
310
310
* @param {boolean } opt_useSameUrl Whether to navigate to current url on creation
311
311
* @param {boolean } opt_copyMockModules Whether to apply same mock modules on creation
312
- * @return {Protractor } a protractor instance.
312
+ * @returns {Protractor } a protractor instance.
313
313
*/
314
314
forkNewDriverInstance :
315
315
( opt_useSameUrl ?: boolean , opt_copyMockModules ?: boolean ) => Browser ;
@@ -340,7 +340,7 @@ export class Browser extends Webdriver {
340
340
* @param {!(string|Function) } script The script to execute.
341
341
* @param {string } description A description of the command for debugging.
342
342
* @param {...* } var_args The arguments to pass to the script.
343
- * @return {!webdriver.promise.Promise.<T> } A promise that will resolve to the
343
+ * @returns {!webdriver.promise.Promise.<T> } A promise that will resolve to the
344
344
* scripts return value.
345
345
* @template T
346
346
*/
@@ -366,7 +366,7 @@ export class Browser extends Webdriver {
366
366
* @param {!(string|Function) } script The script to execute.
367
367
* @param {string } description A description for debugging purposes.
368
368
* @param {...* } var_args The arguments to pass to the script.
369
- * @return {!webdriver.promise.Promise.<T> } A promise that will resolve to the
369
+ * @returns {!webdriver.promise.Promise.<T> } A promise that will resolve to the
370
370
* scripts return value.
371
371
* @template T
372
372
*/
@@ -391,7 +391,7 @@ export class Browser extends Webdriver {
391
391
*
392
392
* @param {string= } opt_description An optional description to be added
393
393
* to webdriver logs.
394
- * @return {!webdriver.promise.Promise } A promise that will resolve to the
394
+ * @returns {!webdriver.promise.Promise } A promise that will resolve to the
395
395
* scripts return value.
396
396
*/
397
397
waitForAngular ( opt_description ?: string ) : webdriver . promise . Promise {
@@ -515,7 +515,8 @@ export class Browser extends Webdriver {
515
515
/**
516
516
* Waits for Angular to finish rendering before searching for elements.
517
517
* @see webdriver.WebDriver.findElement
518
- * @return {!webdriver.WebElement }
518
+ * @returns {!webdriver.promise.Promise } A promise that will be resolved to
519
+ * the located {@link webdriver.WebElement}.
519
520
*/
520
521
findElement ( locator : Locator ) : webdriver . WebElement {
521
522
return this . element ( locator ) . getWebElement ( ) ;
@@ -524,7 +525,7 @@ export class Browser extends Webdriver {
524
525
/**
525
526
* Waits for Angular to finish rendering before searching for elements.
526
527
* @see webdriver.WebDriver.findElements
527
- * @return {!webdriver.promise.Promise } A promise that will be resolved to an
528
+ * @returns {!webdriver.promise.Promise } A promise that will be resolved to an
528
529
* array of the located {@link webdriver.WebElement}s.
529
530
*/
530
531
findElements ( locator : Locator ) : webdriver . promise . Promise {
@@ -534,7 +535,7 @@ export class Browser extends Webdriver {
534
535
/**
535
536
* Tests if an element is present on the page.
536
537
* @see webdriver.WebDriver.isElementPresent
537
- * @return {!webdriver.promise.Promise } A promise that will resolve to whether
538
+ * @returns {!webdriver.promise.Promise } A promise that will resolve to whether
538
539
* the element is present on the page.
539
540
*/
540
541
isElementPresent ( locatorOrElement : webdriver . Locator |
@@ -594,7 +595,7 @@ export class Browser extends Webdriver {
594
595
/**
595
596
* Get a list of the current mock modules.
596
597
*
597
- * @return {Array.<!string|Function> }
598
+ * @returns {Array.<!string|Function> } The list of mock modules.
598
599
*/
599
600
getRegisteredMockModules ( ) : Array < string | Function > {
600
601
return this . mockModules_ . map ( ( module ) => { return module . script ; } ) ;
@@ -853,7 +854,7 @@ export class Browser extends Webdriver {
853
854
* .toBe('http://angular.github.io/protractor/#/api');
854
855
*
855
856
* @param {string } url In page URL using the same syntax as $location.url()
856
- * @return {!webdriver.promise.Promise } A promise that will resolve once
857
+ * @returns {!webdriver.promise.Promise } A promise that will resolve once
857
858
* page has been changed.
858
859
*/
859
860
setLocation ( url : string ) : webdriver . promise . Promise {
@@ -877,6 +878,7 @@ export class Browser extends Webdriver {
877
878
* browser.get('http://angular.github.io/protractor/#/api');
878
879
* expect(browser.getLocationAbsUrl())
879
880
* .toBe('http://angular.github.io/protractor/#/api');
881
+ * @returns {string } The current absolute url from AngularJS.
880
882
*/
881
883
getLocationAbsUrl ( ) : webdriver . promise . Promise {
882
884
this . waitForAngular ( ) ;
@@ -918,7 +920,7 @@ export class Browser extends Webdriver {
918
920
* already be bound to the debugger, so it will not be available, but that is
919
921
* okay.
920
922
*
921
- * @return {Promise<boolean> } A promise that becomes ready when the validation
923
+ * @returns {Promise<boolean> } A promise that becomes ready when the validation
922
924
* is done. The promise will resolve to a boolean which represents whether
923
925
* this is the first time that the debugger is called.
924
926
*/
@@ -1206,13 +1208,13 @@ export class Browser extends Webdriver {
1206
1208
}
1207
1209
1208
1210
/**
1209
- * Create a new instance of Protractor by wrapping a webdriver instance.
1211
+ * Create a new instance of Browser by wrapping a webdriver instance.
1210
1212
*
1211
1213
* @param {webdriver.WebDriver } webdriver The configured webdriver instance.
1212
1214
* @param {string= } opt_baseUrl A URL to prepend to relative gets.
1213
- * @param {boolean= } opt_untrackOutstandingTimeouts Whether Protractor should
1215
+ * @param {boolean= } opt_untrackOutstandingTimeouts Whether Browser should
1214
1216
* stop tracking outstanding $timeouts.
1215
- * @return { Protractor }
1217
+ * @returns { Browser } a new Browser instance
1216
1218
*/
1217
1219
static wrapDriver (
1218
1220
webdriver : webdriver . WebDriver , baseUrl ?: string , rootElement ?: string ,
0 commit comments