I am currently working on setting up a page object model for the login page in my automation project.
conf.js
exports.config={
seleniumAddress:'http://localhost:4444/wd/hub/',
specs: ['spec.js']
}
spec.js
describe('Test suite to verify the login functionality', function(){
it('Verify browser settings', function(){
browser.waitForAngularEnabled(false)
browser.get('http://some-login-page.com');
element(by.id('ctrlLogin_UserName')).sendKeys("valid-login");
element(by.id('ctrlLogin_Password')).sendKeys("valid-password");
element(by.id('ctrlLogin_LoginButton')).click();
});
})
package.json
"name": "automation",
"version": "1.0.0",
"description": "My first automation project",
"main": "conf.js",
"dependencies": {
"jasmine": "^3.5.0",
"protractor": "^5.4.3"
},
If anyone has suggestions on how I can effectively implement the page object model on this login page, I would greatly appreciate it. Thank you!