New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure for Page Object pattern project #46
Comments
My gulp file:
|
Not sure where to start, can you post the error when you run your test? I have cucumber setup with this framework. var expect = require('../common/chai.js'); |
to call the obj loginPageObj.cartButton.click().then(function() { |
Hi There is a bunch of examples at this link: https://github.com/rochejul/gulp-angular-protractor/tree/master/examples Otherwise, could you make a sample of your project and attach it on the issue ? To understand what is the problem ? Many thanks |
You didn't understand my question. I have already done whole protractor project. Everything works well. After some changes now I managed to run the protractor but I only want to run specs I have defined in my protractor config which are: bug gulp runs all specs from my specs folder, and with messed up order. |
Current gulp file:
|
Also, I used to run protractor with parameters like: how do I run protractor with gulp with such parameters? |
Such as the gulp-protractor plugin, the specs property from the protractor config is ignored. So you should change the scope into your gulp file For your blank page, it could be an issue with proxies or security environments. Check the protractor configuration to set up this point Regards |
For security configuration, see angular/protractor#124 |
I figured out blank page was caused by params not found. I passed parameters as args in gulp configuration. |
That means you should declare two suites of tests (and so two gulp task) Example: /*jshint node: true, camelcase: false*/
/*global require: true*/
'use strict';
var gulp = require('gulp');
var gulpProtractorAngular = require('gulp-angular-protractor');
function setupProctator(specs, callback) {
gulp
.src(specs)
.pipe(gulpProtractorAngular({
'configFile': 'protractor.conf.js',
'debug': false,
'autoStartStopServer': true
}))
.on('error', function(e) {
console.log(e);
})
.on('end', callback);
}
// Setting up the test task
gulp.task('protractor', function(callback) {
setupProctator(['**/*.spec.js'], callback);
});
gulp.task('protractor:restricted', function(callback) {
setupProctator(['example.spec.js'], callback);
}); Many thanks |
How do I configure this to make it work when I have following project structure?
pages has PO files, specs has specifications files, data has files with all strings and parameters used for tests, selenium has chromeDriver etc.
The text was updated successfully, but these errors were encountered: