Guest User

Untitled

a guest
Feb 6th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. export default class Login_pageobj {
  2.  
  3. constructor() {
  4. //userName
  5. this.enterUserName = element(by.xpath('//input[@id="username"]'));
  6.  
  7. //Password
  8. this.enterPassword = element(by.xpath('//input[@id="password"]'));
  9.  
  10. //Login Button
  11. this.clickLoginBtn = element(by.buttonText('LOGIN'));
  12.  
  13. //invalid UserName Password Error
  14. this.inValErrMsg = element(by.xpath('//div[@class="subtext"]'));
  15. }
  16.  
  17. //Please enter a user name (required). method
  18. isDisplyedUserNameErrorMsg() {...}
  19.  
  20. import Login_pageobj from '../ES6_pageobj/login_pageobj';
  21.  
  22. describe('Login Page Validation', function() {
  23.  
  24.  
  25. it('Launch Commercial URL',function(){
  26. browser.get('http://applicationurl');
  27. browser.manage().window().maximize();
  28. expect(browser.getTitle()).toBe('LoginWeb');
  29. });
  30.  
  31. it('Login Button should Disabled',function(){
  32. console.log('----------------------------------------------------');
  33. let lgin_pgobj = new login_pageobj();
  34. lgin_pgobj.verifyLgnBtnEnabled();//***unable to access this method***
  35. });
  36. });
  37.  
  38. Debugging with inspector protocol because Node.js v8.9.1 was detected.
  39. node --inspect-brk=23169 node_modulesprotractorbinprotractor
  40. e:CommercialPOC/conf.js --suite es6
  41. Debugger listening on ws://127.0.0.1:23169/e3dfd326-8468-4a3a-a2e3-3094d97c5571
  42. (node:4708) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
  43. (node:4708) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
  44. warning.js:18
  45. [22:00:06] I/launcher - Running 1 instances of WebDriver
  46. logger.js:155
  47. [22:00:06] I/direct - Using ChromeDriver directly...
  48. logger.js:155
  49. null
  50. conf.js:48
  51. [22:00:25] E/launcher - Error:
  52. e:commercialPOCES6_moduleScenariosLogin_spec.js:1
  53. logger.js:155
  54. (function (exports, require, module, __filename, __dirname) { import
  55. Login_pageobj from '../ES6_pageobj/login_pageobj';
  56. ^^^^^^
  57. SyntaxError: Unexpected token import
  58. at createScript (vm.js:80:10)
  59. at Object.runInThisContext (vm.js:139:10)
  60. at Module._compile (module.js:599:28)
  61. at Object.Module._extensions..js (module.js:646:10)
  62. at Module.load (module.js:554:32)
  63. at tryModuleLoad (module.js:497:12)
  64. at Function.Module._load (module.js:489:3)
  65. at Module.require (module.js:579:17)
  66. at require (internal/module.js:11:18)
  67. at e:CommercialPOCnode_modulesjasminelibjasmine.js:93:5
  68. [22:00:25] E/launcher - Process exited with error code 100
Add Comment
Please, Sign In to add comment