Skip to content

Instantly share code, notes, and snippets.

@PrashantBhatasana
Last active April 22, 2019 17:30
Show Gist options
  • Save PrashantBhatasana/3d62e4bbc594ec214daa9617f203d45b to your computer and use it in GitHub Desktop.
Save PrashantBhatasana/3d62e4bbc594ec214daa9617f203d45b to your computer and use it in GitHub Desktop.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/* global browser, By, element, expect */
describe('Spec | Test Login', function () {
browser.driver.get('https://my.prodappcms.test.com/');
it('should find correct title', function () {
expect(browser.driver.getTitle()).toEqual('Service Hub CMS');
});
it('Login', function () {
//Email id
console.log('Redirect successfully');
element(By.model('loginFormData.login_user_id')).sendKeys('9999').then(function () {
console.log('Email successful');
browser.sleep(500);
});
//Password
element(By.id('password')).sendKeys('123456').then(function () {
console.log('Password successful');
browser.sleep(500);
});
//Submit
element(By.id("btn-login')]")).click().then(function () {
console.log('Login Successful');
browser.sleep(2000);
});
expect(browser.getTitle()).toEqual('Home | Service Hub CMS');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment