Created
January 27, 2017 11:37
-
-
Save sawo/5a991a130c138dd3460e4f0f5c1fc2d8 to your computer and use it in GitHub Desktop.
Page object for the hello world angular application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var helloWorldPageObject = function() { | |
this.get = function() { | |
browser.get(''); | |
}; | |
this.title = element(by.id('title')); | |
this.titleShouldHaveText = function(value) { | |
expect(this.title.getText()).toBe(value); | |
}; | |
this.name = element(by.model('name')); | |
this.setName = function(value) { | |
this.name.clear(); | |
this.name.sendKeys(value); | |
}; | |
this.shouldHaveName = function(value) { | |
expect(this.name.getAttribute('value')).toEqual(value); | |
}; | |
}; | |
module.exports = new helloWorldPageObject(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment