browser is the new, preferred syntax. browser
is the same as protractor.getInstance()
.
A few versions ago a new syntax was introduced. The major changes were:
browser
is a protractor instanceelement(locator)
is the new syntax forptor.findElement(locator)
by[strategy]
is the new syntax forprotractor.By.[strategy]
Here is the new documentation: http://angular.github.io/protractor/#/api