protractor - Require: Doesn't find a file (Page Object Pattern) -
i'm trying incorporate page object pattern in protractor testing reason don't know it's not working. must before doing change, running perfect.
in test folder have file test.spec.js this:
'use strict'; var loginpage = require('../pages/login.page.js'); describe('login --> ', function(){ 'use strict'; var ptor; var page; beforeeach(function () { page = new loginpage(); ptor = protractor.getinstance(); ptor.waitforangular(); }); describe('false login --> ', function(){ it('it should false login pin --> ', function(){ /* code */ }); }); });
and in same folder got 1 called "pages" , inside of file login.page.js. when run tests doesn't find login.page.js.
"error: cannot find module '../pages/login.page.js'"
anyone knows why?
thanks guys ;)
if folder pages located in same folder test.spec.js have use require('./pages/login.page.js');
Comments
Post a Comment