Skip to content

Instantly share code, notes, and snippets.

@rafaelportela
Created September 17, 2014 10:29
Show Gist options
  • Save rafaelportela/269f7247ee14c44f8c6d to your computer and use it in GitHub Desktop.
Save rafaelportela/269f7247ee14c44f8c6d to your computer and use it in GitHub Desktop.
[Protractor Meetup] (angular/tests/Pages/homepage.js) Page object file
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