Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default class Login_pageobj {
- constructor() {
- //userName
- this.enterUserName = element(by.xpath('//input[@id="username"]'));
- //Password
- this.enterPassword = element(by.xpath('//input[@id="password"]'));
- //Login Button
- this.clickLoginBtn = element(by.buttonText('LOGIN'));
- //invalid UserName Password Error
- this.inValErrMsg = element(by.xpath('//div[@class="subtext"]'));
- }
- //Please enter a user name (required). method
- isDisplyedUserNameErrorMsg() {...}
- import Login_pageobj from '../ES6_pageobj/login_pageobj';
- describe('Login Page Validation', function() {
- it('Launch Commercial URL',function(){
- browser.get('http://applicationurl');
- browser.manage().window().maximize();
- expect(browser.getTitle()).toBe('LoginWeb');
- });
- it('Login Button should Disabled',function(){
- console.log('----------------------------------------------------');
- let lgin_pgobj = new login_pageobj();
- lgin_pgobj.verifyLgnBtnEnabled();//***unable to access this method***
- });
- });
- Debugging with inspector protocol because Node.js v8.9.1 was detected.
- node --inspect-brk=23169 node_modulesprotractorbinprotractor
- e:CommercialPOC/conf.js --suite es6
- Debugger listening on ws://127.0.0.1:23169/e3dfd326-8468-4a3a-a2e3-3094d97c5571
- (node:4708) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
- (node:4708) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
- warning.js:18
- [22:00:06] I/launcher - Running 1 instances of WebDriver
- logger.js:155
- [22:00:06] I/direct - Using ChromeDriver directly...
- logger.js:155
- null
- conf.js:48
- [22:00:25] E/launcher - Error:
- e:commercialPOCES6_moduleScenarios Login_spec.js:1
- logger.js:155
- (function (exports, require, module, __filename, __dirname) { import
- Login_pageobj from '../ES6_pageobj/login_pageobj';
- ^^^^^^
- SyntaxError: Unexpected token import
- at createScript (vm.js:80:10)
- at Object.runInThisContext (vm.js:139:10)
- at Module._compile (module.js:599:28)
- at Object.Module._extensions..js (module.js:646:10)
- at Module.load (module.js:554:32)
- at tryModuleLoad (module.js:497:12)
- at Function.Module._load (module.js:489:3)
- at Module.require (module.js:579:17)
- at require (internal/module.js:11:18)
- at e:CommercialPOCnode_modulesjasminelibjasmine.js:93:5
- [22:00:25] E/launcher - Process exited with error code 100
Add Comment
Please, Sign In to add comment