Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
* 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; //Perform Click on Famelogin
this.loginEmail.sendKeys(userName); //Enters Username into Email field
this.loginPassword.sendKeys(password); //Enters Password into Email field; //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
You can’t perform that action at this time.