This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1120,8 +1120,13 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver {
1120
1120
}
1121
1121
1122
1122
/**
1123
- * Returns the current absolute url from AngularJS .
1123
+ * Deprecated, use `browser.getCurrentUrl()` instead .
1124
1124
*
1125
+ * Despite its name, this function will generally return `$location.url()`, though in some
1126
+ * cases it will return `$location.absUrl()` instead. This function is only here for legacy
1127
+ * users, and will probably be removed in Protractor 6.0.
1128
+ *
1129
+ * @deprecated Please use `browser.getCurrentUrl()`
1125
1130
* @example
1126
1131
* browser.get('http://angular.github.io/protractor/#/api');
1127
1132
* expect(browser.getLocationAbsUrl())
@@ -1130,6 +1135,8 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver {
1130
1135
* AngularJS.
1131
1136
*/
1132
1137
getLocationAbsUrl ( ) : wdpromise . Promise < any > {
1138
+ logger . warn (
1139
+ '`browser.getLocationAbsUrl()` is deprecated, please use `browser.getCurrentUrl` instead.' ) ;
1133
1140
return this . waitForAngular ( ) . then (
1134
1141
( ) => this . executeScriptWithDescription (
1135
1142
clientSideScripts . getLocationAbsUrl , 'Protractor.getLocationAbsUrl()' , this . rootEl ) ) ;
You can’t perform that action at this time.
0 commit comments