What's the correct Protractor's syntax for Page Objects?
问题 I've come across different types of syntax for Protractor's Page Objects and I was wondering, what's their background and which way is suggested. This is the official PageObject syntax from Protractor's tutorial. I like it the most, because it's clear and readable: use strict; var AngularHomepage = function() { var nameInput = element(by.model('yourName')); var greeting = element(by.binding('yourName')); this.get = function() { browser.get('http://www.angularjs.org'); }; this.setName =