Created
June 10, 2016 17:33
-
-
Save kkashyap1707/ce8d2a720c4c802cd211bba5d5ff7511 to your computer and use it in GitHub Desktop.
login.po.js file is used as an Object Repository where you can add the page objects as well as the actions performed on that objects
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
/** | |
* Created by Keshav on 6/9/2016. | |
* login.po.js file | |
*/ | |
var loginPage = function(){ | |
var params = browser.params; | |
//Object Locators | |
function loginPage() | |
{ | |
this.loginFame=element( by.css('[ng-click="loginDialog()"]') ); //Login Button Locator | |
this.loginEmail=element(by.model('email')); //Email Box Locator | |
this.loginPassword=element(by.model('password')); //Password Box Locator | |
this.loginSubmit=element(by.css('[ng-click="submit()"]')); //Submit Button Locator | |
} | |
loginPage.prototype.manualLogin = function (userName , password) // No datatypes required | |
{ | |
console.log("Entered inside manual--------- "); //To print any desired value on Console | |
this.loginFame.click(); //Perform Click on Famelogin | |
this.loginEmail.sendKeys(userName); //Enters Username into Email field | |
this.loginPassword.sendKeys(password); //Enters Password into Email field | |
this.loginSubmit.click(); //Click on Submit Button | |
}; | |
return loginPage; | |
}(); | |
module.exports= loginPage; //To use the above mentioned function in another file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment