Created
September 17, 2014 10:29
-
-
Save rafaelportela/269f7247ee14c44f8c6d to your computer and use it in GitHub Desktop.
[Protractor Meetup] (angular/tests/Pages/homepage.js) Page object file
This file contains hidden or 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 homePage = function() { | |
this.getPageTitle = function() { | |
return element(by.tagName('h1')).getText(); | |
}; | |
this.searchArtist = function(artist) { | |
var searchfield = element(by.css("#search-field")); | |
searchfield.sendKeys(artist); | |
}; | |
this.artistName = function() { | |
return element(by.css('li.artist h2')).getText(); | |
} | |
this.selectArtist=function(artistName) { | |
return element(by.css('li.artist h2')).click(); | |
}; | |
this.verifyText = function() { | |
return element(by.css(".bio")).getText(); | |
} | |
}; | |
module.exports = new homePage(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment