Last active
August 29, 2015 14:17
-
-
Save safrrhmn/23676b3ac42452e9f66c to your computer and use it in GitHub Desktop.
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
'use strict'; | |
var BasePage = require('./baseProtractorPage.js'); | |
var giftengHomePage = function () { | |
browser.get('http://www.gifteng.com/'); | |
}; | |
giftengHomePage.prototype = Object.create({}, { | |
loginButton: { | |
get: function () { | |
return element(by.css("[ng-if='!user.logged']>[type='button']")) | |
} | |
}, | |
email: { | |
get: function () { | |
return element(by.css('.container.login.ng-scope #email')) | |
} | |
}, | |
password: { | |
get: function () { | |
return element(by.css("[placeholder='Password']")) | |
} | |
}, | |
signInButton: { | |
get: function () { | |
return element(by.css("[type='submit']")) | |
} | |
}, | |
InvalidLogInUnSuccess: { | |
get: function () { | |
element | |
this.loginButton.click(); | |
this.email.sendKeys("Test"); | |
} | |
} | |
}); | |
module.exports = giftengHomePage |
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 GiftengHomePage = require('./../../pageObjects/giftengHomePage.js'); | |
describe('gifteng page',function(){ | |
var giftengHomePage; | |
beforeEach(function(){ | |
giftengHomePage = new GiftengHomePage(); | |
}); | |
it('Should submit the credentials',function(){ | |
giftengHomePage.InvalidLogInUnSuccess; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment