GithubHelp home page GithubHelp logo

Comments (28)

jrichter1 avatar jrichter1 commented on May 29, 2024 1

Would this help? #42

from gulp-angular-protractor.

morozserg avatar morozserg commented on May 29, 2024

+1.
Tried to set in protractor config
seleniumServerJar: '/node_modules/protractor/node_modules/webdriver-manager/selenium-server-standalone-3.3.1.jar',
Didn't work.
Could you please take a look. Some workaround needed.
The best solution is to move protractor version to the latest one

from gulp-angular-protractor.

guan01 avatar guan01 commented on May 29, 2024

+1,
would like to test latest Chrome version.
Not urgent for me, please update dependency when you have a chance.
thanks

from gulp-angular-protractor.

fertavora avatar fertavora commented on May 29, 2024

I tried to create a branch and push an update but I got a 403 error.
Bascially, I updated package.json dependencies to "protractor": "5.1.1"
Not sure if that fully helps but we can give it a try.

from gulp-angular-protractor.

fertavora avatar fertavora commented on May 29, 2024

Go ahead and merge the PR. Thanks!

from gulp-angular-protractor.

rochejul avatar rochejul commented on May 29, 2024

Hi

I prefer doing the following stuff: #40 (comment)

If I have some time in the next week, I will achieve it

Regards

from gulp-angular-protractor.

fertavora avatar fertavora commented on May 29, 2024

Makes sense, thanks!

from gulp-angular-protractor.

benburton-se avatar benburton-se commented on May 29, 2024

Hi, is there a workaround for this? Rolling back Chrome is not supported

from gulp-angular-protractor.

davidsulc avatar davidsulc commented on May 29, 2024

Hi @rochejul,

Yes, I think the proposed solution in #40 will be the best solution. But note that the version of webdriver-manager should also be possible to specify. In fact, (for this issue) it is more important to be able to specify the webdriver version than protractor: outdated webdriver versions seem to be the main issue with Chrome updates breaking testing setups. By making it possible to update the webdriver to follow Chrome updates, it should no longer be necessary to update gulp-angular-protractor for these cases.

from gulp-angular-protractor.

fertavora avatar fertavora commented on May 29, 2024

Why should webdriver-manager be handled as a different dependency?
It comes within protractor so I guess using the latest protractor version it indeed uses latest webdriver-manager version.

from gulp-angular-protractor.

davidsulc avatar davidsulc commented on May 29, 2024

But then you're once again dependent on the update schedule of somebody's package for your tests to be working. If you can use the webdrirver-manager version that you want, you can update as soon as Chrome introduces breaking changes, regardless of when the protractor package updates its own dependencies. Or am I missing something?

from gulp-angular-protractor.

dannyskoog avatar dannyskoog commented on May 29, 2024

@rochejul What's the status of what you talked about doing in your previous comment?

from gulp-angular-protractor.

rochejul avatar rochejul commented on May 29, 2024

@dannyskoog I try to deliver a 1.0.0 as soon as possible
See https://github.com/rochejul/gulp-angular-protractor/tree/releases/1.0.0

Regards

from gulp-angular-protractor.

dannyskoog avatar dannyskoog commented on May 29, 2024

@rochejul Sounds great. Cheers!

from gulp-angular-protractor.

benburton-se avatar benburton-se commented on May 29, 2024

Just upgraded to 1.0.0 and it's working for us. Thanks :)

from gulp-angular-protractor.

rochejul avatar rochejul commented on May 29, 2024

@benburton-capgemini you are welcome

from gulp-angular-protractor.

fertavora avatar fertavora commented on May 29, 2024

@benburton-capgemini How did you make it to work? I updated to 1.0.0 but it is still using Chrome Driver 2.26 🤔

from gulp-angular-protractor.

rochejul avatar rochejul commented on May 29, 2024

I think you should do first an npm uninstall of the plugin, install nexte the expected version of protractor and webdriver-manager, and then install the plugin

from gulp-angular-protractor.

benburton-se avatar benburton-se commented on May 29, 2024

@fertavora killed running instances of Chrome/Chrome driver on build machine. Pushed the change to package.json for 1.0.0 and then npm install in the build did the rest. I've just tried the gulp task locally and it's working fine there also. If @rochejul's advice doesn't work, maybe try deleting your node_modules folder?

from gulp-angular-protractor.

guan01 avatar guan01 commented on May 29, 2024

Hi guys, first want to thanks for the big update. I am new and sorry for some newbie questions.
I did the update and maybe I did the wrong step, please correct me. thanks in advance. Please help

  1. good baseline Chrome v53 and v0.4.2
  2. npm uninstall gulp-angular-protractor (and delete dir from node_modules)
  3. npm install --save-dev protractor (version 5.1.1)
  4. npm install --save-dev webdriver-manager (version 12.0.5)
    webdriver-manager start (no error)
  5. npm install --save-dev gulp-angular-protractor (version 1.0.0)
  6. run tests and compare with step 1.

[11:53:36] gulp-angular-protractor - Webdriver standalone server is started
[11:53:36] gulp-angular-protractor - We will run the Protractor engine
[11:53:36] I/launcher - Running 1 instances of WebDriver
[11:53:36] E/local - Error code: 135
[11:53:36] E/local - Error message: No update-config.json found. Run 'webdriver-manager update' to download binaries.
[11:53:36] E/local - Error: No update-config.json found. Run 'webdriver-manager update' to download binaries.
at IError (C:\Automation\node_modules\protractor\built\exitCodes.js:5:1)
at ProtractorError (C:\Automation\node_modules\protractor\built\exitCodes.js:10:9)
at BrowserError (C:\Automation\node_modules\protractor\built\exitCodes.js:51:9)
at Local.addDefaultBinaryLocs_ (C:\Automation\node_modules\protractor\built\driverProviders\local.js:40:23)
at Local.setupDriverEnv (C:\Automation\node_modules\protractor\built\driverProviders\local.js:81:14)
at Local.setupEnv (C:\Automation\node_modules\protractor\built\driverProviders\driverProvider.js:110:34)
at q.then (C:\Automation\node_modules\protractor\built\runner.js:334:41)
at _fulfilled (C:\Automation\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Automation\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Automation\node_modules\protractor\node_modules\q\q.js:796:13)
[11:53:36] E/launcher - Process exited with error code 135
[11:53:37] gulp-angular-protractor - Webdriver standalone server is stopped
{ [Error: protractor exited with code 135]
message: 'protractor exited with code 135',
showStack: false,
showProperties: true,
plugin: 'gulp-angular-protractor',
__safety: { toString: [Function: bound ] } }
[11:53:37] 'e2e' errored after 3.28 s
[11:53:37] Error in plugin 'gulp-angular-protractor'
Message:
protractor exited with code 135

from gulp-angular-protractor.

rochejul avatar rochejul commented on May 29, 2024

@guan01 Hi
Maybe the downloaded version of protractor or webdriver need this file ?

In the readme, I show you a stable example:

{
  "name": "example-gulp-protractor",
  "version": "0.0.1",
  "description": "",
  "scripts": {
    "gulp": "node node_modules/gulp/bin/gulp.js",
    "test": "npm run gulp protractor"
  },
  "devDependencies": {
    "gulp": "latest",
    "gulp-angular-protractor": "latest",
    "protractor": "4.0.11",
    "webdriver-manager": "10.2.8"
  }
}

And said this:

Be carefull: some protractor and webdriver dependencies version required:

Some specific node version
Some specific npm version
Some specific browser version
...

Regards

from gulp-angular-protractor.

guan01 avatar guan01 commented on May 29, 2024

@rochejul, Many thanks, I was able to run your example. I am running into another issue which totally not related to the framework, but perhaps you can help point me in the right direction?

After changing the Gulpfile.js and protractor.conf.js I got an error that google show very few solutions.
Here is the error:

[17:19:11] I/update - selenium standalone: v2.53.1 up to date
[17:19:12] I/update - IEDriverServer: unzipping C:\e2e\node_modules\webdriver-manager\selenium\IEDriverServer_Win32_2.53.1.zip
[17:19:12] I/update - IEDriverServer: unzipping C:\e2e\node_modules\webdriver-manager\selenium\IEDriverServer_Win32_2.53.1.zip
[17:19:12] I/update - geckodriver: file exists C:\e2e\node_modules\webdriver-manager\selenium\geckodriver-v0.11.1-win64.zip
[17:19:12] I/update - geckodriver: unzipping geckodriver-v0.11.1-win64.zip
[17:19:12] I/update - geckodriver: vv0.11.1 up to date
[17:19:12] gulp-angular-protractor - Webdriver standalone is updated
[17:19:12] gulp-angular-protractor - Webdriver standalone server will be started
[17:19:13] gulp-angular-protractor - Webdriver standalone server is started
[17:19:13] gulp-angular-protractor - We will run the Protractor engine
[17:19:13] I/local - Starting selenium standalone server...
[17:19:13] I/launcher - Running 1 instances of WebDriver
[17:19:14] I/local - Selenium standalone server started at http://192.168.201.134:58045/wd/hub
[17:19:17] E/launcher - Error: C:\e2e\node_modules.bin\cucumber.js:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at getDefinitions (C:\e2e\node_modules\cucumber\lib\cucumber\cli\profiles_loader.js:8:23)
[17:19:17] E/launcher - Process exited with error code 100
[17:19:17] gulp-angular-protractor - Webdriver standalone server is stopped
{ [Error: protractor exited with code 100]
message: 'protractor exited with code 100',
showStack: false,
showProperties: true,
plugin: 'gulp-angular-protractor',
__safety: { toString: [Function: bound ] } }
[17:19:17] gulp-angular-protractor - Webdriver standalone server will be closed

C:\e2e>

===============gulp ==============
/jshint node: true, camelcase: false/
/global require: true/

'use strict';

var gulp = require('gulp'),
gulpProtractorAngular = require('gulp-angular-protractor'),
tslint = require('gulp-tslint'),
tsconfig = require('tsconfig-glob'),
tscConfig = require('./tsconfig.json'),
sourcemaps = require('gulp-sourcemaps'),
typescript = require('gulp-typescript'),
reporter = require('gulp-protractor-cucumber-html-report'),
argv = require('yargs').argv,
del = require('del');

// Setting up the test task
gulp.task('e2e', function(callback) {
gulp
// .src(['example_spec.js'])
.src(['/e2e/build/**/*.feature'])
.pipe(gulpProtractorAngular({
'configFile': 'protractor.conf.js',
'debug': false,
'autoStartStopServer': true,
'verbose': false,
'webDriverUpdate': {
'browsers': ['ie'],
'args': ['--ie32']
},
'webDriverStart': {
'args': ['--ie32']
}
}))
.on('error', function(e) {
console.log(e);
})
.on('end', callback);
});

// clean the contents of the e2e/build directory
gulp.task('clean-e2e', function () {
return del('/e2e/build/**/*');
});

// copy e2e files
gulp.task('copy-e2e', ['clean-e2e'], function() {
return gulp.src(['/e2e/app//*', '!/e2e/app//*.ts'], { base : '/e2e' })
.pipe(gulp.dest('/e2e/build'))
});

// linting e2e
gulp.task('tslint-e2e', function() {
return gulp.src(['/e2e/app/**/*.ts'])
.pipe(tslint())
.pipe(tslint.report('verbose'));
});

// TypeScript compile e2e
gulp.task('compile-e2e', ['clean-e2e'], function () {
return gulp
.src(tscConfig.e2eFiles)
.pipe(sourcemaps.init())
.pipe(typescript(tscConfig.compilerOptions))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('/e2e/build/app'));
});

gulp.task('report', function () {
return gulp
.src('./e2e/reports/cucumber-test-results*.json')
.pipe(reporter({
dest: '/e2e/reports/'
}));
});

//build e2e only
gulp.task('build-e2e', ['tslint-e2e', 'compile-e2e', 'copy-e2e']);

=== protractor.conf.js ==========
exports.config = {
baseUrl: 'http://localhost:3000',
specs: ['dist/**/*.feature'],
// directConnect: false,
exclude: [],
maxSessions: 1,

multiCapabilities: [{
    browserName: 'chrome',
}
],

allScriptsTimeout: 110000,
getPageTimeout: 100000,

framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
cucumberOpts: {
    require: ['../e2e/build/**/*steps.js', 'cucumber-hooks.js', 'screenshot.js'],
    format: 'pretty',
    tags: ['@Login', '@HomePage'],
    keepAlive: false
},

/**
 * ng2 related configuration
 *
 * useAllAngular2AppRoots: tells Protractor to wait for any angular2 apps on the page instead of just the one matching
 * `rootEl`
 *
 */
 useAllAngular2AppRoots: true

};

from gulp-angular-protractor.

guan01 avatar guan01 commented on May 29, 2024

Hi, is possible that you can help provide a working example with Cucumber instead of Jasmine?

from gulp-angular-protractor.

rochejul avatar rochejul commented on May 29, 2024

Hi @guan01

There is an old example with this project: https://github.com/plopcas/example-protractor

Maybe it works again ?

Regards

from gulp-angular-protractor.

guan01 avatar guan01 commented on May 29, 2024

Thank you, I managed to find the error in my environment. 1.0.0 is fully working.

from gulp-angular-protractor.

rochejul avatar rochejul commented on May 29, 2024

@guan01 Good news !

from gulp-angular-protractor.

danyc avatar danyc commented on May 29, 2024

@guan01 could you please explain the finding? I had similar issue and did not have enough time to investigate.
Thank you

from gulp-angular-protractor.

guan01 avatar guan01 commented on May 29, 2024

@danyc the issue for me was Cucumber.js was calling the wrong path.
This is the original call from /node_modules/cucumber/lib/cli/profiles_loader.js line 8
var definitionFilePath = path.join(process.cwd(), 'cucumber.js');
if you print out the path, its going to /node_modules/.bin/cucumber.js, which is wrong

I hard coded the path to
var definitionFilePath = 'C:\htmlDev35\node_modules\cucumber\lib\cucumber\cli\cucumber.js';

now works in latest chrome/ff/ie/edge for me.

Hope this fix your issue as well.

from gulp-angular-protractor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.