Code Monkey home page Code Monkey logo

gulp-protractor's People

Contributors

adorsk avatar barbogast avatar barroudjo avatar bendrucker avatar bwiklund avatar clkao avatar czchen avatar daleljefferson avatar khepin avatar lukehorvat avatar manoj9788 avatar marketionist avatar mathieutricoire avatar matoilic avatar mattfritz avatar mpetrovich avatar nkijak avatar pedrro avatar plwalters avatar radu-c avatar rahulmr avatar robbinhabermehl avatar rogierschouten avatar simison avatar steffenmllr avatar szimek avatar thedancingcode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gulp-protractor's Issues

How to keep running the Webdriver instance when a test fail?

I've searched for hours and I wonder if this is possible.

I start a "gulp serve" and when I modify my .js or html files I can see the tests being executed every time I save. However when the test is failed, I got this:

1 test, 1 assertion, 1 failure
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 failed 1 test(s)
[launcher] overall: 1 failed spec(s)
[launcher] Process exited with error code 1
{ [Error: protractor exited with code 1]
message: 'protractor exited with code 1',
showStack: false,
showProperties: true,
plugin: 'gulp-protractor',
__safety: { toString: [Function] } }

And I need to CTRL-C my console window and do a "gulp serve" again if I want to continue with the tests being executed. Is there a way to avoid this?

Error with gulp-protractor on xvfb centos6

Hi ,

I got the next error look like #10

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1101:11)
at Process.ChildProcess._handle.onexit (child_process.js:802:34)

But with last version of gulp-protractor on a centos-6 server with xvfb

node : v0.10.35
npm : 2.1.18
java: jdk 1.7.0_09

Can you help me to debug ?

ignoreSynchronization is required

Is anyone else having getting the error:

Error: Error while waiting for Protractor to sync with the page: {}

I have a minimal angular project and a basic test

describe('Home', function(){

    beforeEach(function(){
        browser.get('http://localhost:3020/#/home');
    });

    it('should have a title element', function(){
        expect($('h1').isPresent()).toBe(true);
    });

});

Which gives me that error. I can fix it by adding ignoreSynchronization to the beforeEach but that shouldnt be required in every test file.

    beforeEach(function(){
        browser.ignoreSynchronization = true;
        browser.get('http://localhost:3020/#/home');
    });

Getting ENOENT error on Windows when using Gulp Protractor

Used Yeoman to generate an app with the Angular Gulp generator, getting this

$ gulp protractor
[16:34:45] Using gulpfile d:\Github\AngularMusicStoredotNet\FrontEnd\gulpfile.js
[16:34:45] Starting 'wiredep'...
[16:34:45] Starting 'scripts'...
[16:34:46] Starting 'injector:css:preprocessor'...
[16:34:46] Starting 'webdriver-update'...
[16:34:46] gulp-inject Nothing to inject into index.scss.
[16:34:46] Finished 'wiredep' after 1.09 s
[16:34:46] Finished 'injector:css:preprocessor' after 621 ms
[16:34:46] Starting 'styles'...
selenium standalone is up to date.
chromedriver is up to date.
[16:34:47] Finished 'webdriver-update' after 628 ms
[16:34:47] Finished 'scripts' after 1.53 s
[16:34:47] Finished 'styles' after 1.16 s
[16:34:47] Starting 'injector:css'...
[16:34:47] gulp-inject 1 files into index.html.
[16:34:47] Finished 'injector:css' after 9.19 ms
[16:34:47] Starting 'injector:js'...
[16:34:48] gulp-inject 3 files into index.html.
[16:34:48] Finished 'injector:js' after 430 ms
[16:34:48] Starting 'serve:e2e'...
[16:34:48] Finished 'serve:e2e' after 173 ms
[16:34:48] Starting 'protractor:src'...
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
[launcher] Process exited with error code 1

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1011:11)
at Process.ChildProcess._handle.onexit (child_process.js:802:34)

d:\Github\AngularMusicStoredotNet\FrontEnd\gulp\e2e-tests.js:25
throw err;
^
Error: protractor exited with code 8

Already looked here, #10 and it looks like I'm having the same issue and was able to run the tests from the Git repo mentioned, but not sure what to do next.

Thanks,

Add support for debug mode

Protractor allows tests to be paused with browser.debugger() when run in debug mode like so:

protractor debug debugging/failureConf.js

However, gulp-protractor does not appear to support this feature. It would be nice to be able to enable it via the options object:

protractor({
    debug: true,
    configFile: 'tests/protractor/protractor.conf.js'
})

Static path to linked bins

index.js line 20 hard codes the path to binaries as .bin, which is the directory which contains linked binaries. If npm install is executed with the --no-bin-links option, gulp-protractor will fail to locate the binary files.

Spaces in File Path

I've been currently working on a TFS Build which will spin up selenium and run protractor tests against a deployment.

Whilst setting this up, i noticed that if my folder path for where the node_modules folder is located contains a space, gulp protractor bombs out when trying to reference one of the file paths.

For example:

'c:\dev\folder\node_modules\gulp-protractor' works absolutely fine
'c:\dev\new folder\node_modules\gulp-protractor' will throw an error along the lines of 'c:\dev\new' is an unrecognised command'

I managed to get round the error by just re-working how my folder paths are named, but thought i'd mention anyway!

Corrupt jarfile selenium-server-standalone-2.45.0.jar

node v0.12.1
selenium-server-standalone-2.45.0.jar

My tasks in gulp:

var webdriverUpdate = require('gulp-protractor').webdriver_update;
var webdriverStandalone = require('gulp-protractor').webdriver_standalone;

gulp.task('webdriver-update', webdriverUpdate);
gulp.task('webdriver-standalone', webdriverStandalone);

Task started in gulp via Webstorm.

I was update selenium server driver by "webdriver-update" gulptask and try start "webdriver-standalone" task, but get error "Invalid or corrupt jarfile selenium-server-standalone-2.45.0.jar".

I was download selenium jar manually from http://docs.seleniumhq.org/download/ and replace file in webdriver-manager/selenium folder and "webdriver-standalone" task work correct! Selenium server was started.

Please, check source of files for download.

Selenium not found

Protractor was update a couple days ago and it appears to have broken the build of this component. Now when I install this component the protractor it installs does not have the selenium standalone located in the correct directory, (protractor now uses a newer version of selenium).

I have reverted to running protractor via a child process until this has been resolved:

gulp.task("e2e-test", ["server"], function(done) {
    exec("protractor protractor.conf.js", function(err, stdout) {
        console.log(stdout);
        connect.serverClose();
        done();
    });
});

This requires npm install protractor and webdriver-manager update to be run as well.

Unhandled 'error' event spawn ENOENT

Running the gulp e2etests:run after updating the webdriver and the new references in the config file, I got the following error, both in my project and the exemple_2 of this repo :

Starting selenium standalone server...   

events.js:72
    throw er; // Unhandled 'error' event
          ^ 
Error: spawn ENOENT
    at errnoException (child_process.js:988:11)
    at Process.ChildProcess._handle.onexit (child_process.js:779:34)
{ plugin: 'gulp-protractor', 
    showStack: false,
    message: 'protractor exited with code 8' }

Running tests give me 5 passing and 1 pending.

I'm under Archlinux, but maybe linked with #13 ?

Thanks !

Gulp-protractor keep saying “Spec patterns did not match any files”

I'm trying to run my end to end tests written with protractor and jasmine. It works perfectly when I call protractor protractor.config.js directly.

However, when I use gulp-protractor, I keep getting the "Spec patterns did not match any files" error and the tests do not run.

This is my protractor runner gulp task:

gulp.task('protractor-run', function (done) {
    return gulp.src(["./e2e-tests/**/*-spec.js"])
        .pipe(protractor({
            configFile: "./config/protractor-config.js",
            args: ['--baseUrl', 'http://127.0.0.1:8000']
        }))
        .on('error', function(e) { throw e })
});

and this is the error:

WARNING - pattern C:\path\to\app\e2e-tests\login\login-spec.js did not math any files.
[launcher] Process exited with error code 1
C:\path\to\app\node_modules\protractor\node_modules\q\q.js:126
                   throw e;
                   ^

Error: Spec patterns did not match any files.

What am I missing?

webdriver_standalone not defined error

Following this example from documentation:

var webdriver = require("gulp-protractor").webdriver_standalone;
gulp.task('webdriver_standalone', webdriver_standalone);

results in this error:

$ gulp webdriver_standalone

/Users/dmoore/projects/tutorials/angular-phonecat2/gulpfile.js:53
gulp.task('webdriver_standalone', webdriver_standalone);
                                  ^
ReferenceError: webdriver_standalone is not defined
  at Object.<anonymous> (/Users/dmoore/projects/tutorials/angular-phonecat2/gulpfile.js:53:35)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:62:18)
  at Liftoff.launch (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:144:6)
  at Object.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:25:5)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:902:3

Pass proxy

Please see my code below:

'use strict';

var gulp = require('gulp'),
shell = require('gulp-shell'),
protractor = require('gulp-protractor').protractor,
webdriver_update = require('gulp-protractor').webdriver_update;

function runMochaOnWebdriver() {
shell.task('webdriver-manager start &', {quiet: true})();

//Allow webdriver to start, should not take more than 4181ms
setTimeout(function() {
    return shell.task('_iosTest=0 mocha ./**/*.test.js')();
}, 4181);

}

function runMochaOnAppium() {
shell.task('appium', {quiet: true})();

//Allow webdriver to start, should not take more than 4181ms
setTimeout(function() {
    return shell.task('_iosTest=1 mocha ./**/*.test.js')();
}, 4181);

}

gulp.task('test-e2e', ['webdriver-update'], runMochaOnWebdriver);
gulp.task('test-ios', runMochaOnAppium);
gulp.task('webdriver-update', webdriver_update);


When run script, i can't update webdriver because my computer behind proxy. how to config args for pass proxy?

Logs error:

Updating selenium standalone
downloading https://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar...
Updating chromedriver
downloading https://chromedriver.storage.googleapis.com/2.15/chromedriver_mac32.zip...
Error: Got error Error: getaddrinfo ENOTFOUND from https://chromedriver.storage.googleapis.com/2.15/chromedriver_mac32.zip
Error: Got error Error: getaddrinfo ENOTFOUND from https://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar

params cannot be passed through args

When trying to pass custom params throught protractor --params, the argument is being sliced per letters and stored as an array. Any idea why ?

gulp.task 'protractor', ['combine_minifiy'], ->
  gulp.src 'test/**/*.spec.coffee'
  .pipe protractor
      configFile: 'test/protractor.conf.coffee'
      args: ['--params', '[email protected]']
      # same behavior when passing args: ['--params', ['[email protected]']]
  .on 'error', (err) ->
    console.log "protractor failed: #{err.message}"

Running the test with a console.log browser.params outputs the following

{ '0': 'e',
  '1': 'm',
  '2': 'a',
  '3': 'i',
  '4': 'l',
  '5': '=',
  '6': 'x',
  '7': '@',
  '8': 'x',
  '9': '.',
  '10': 'c',
  '11': 'o',
  '12': 'm',
  email: '[email protected]',
  password: '******'}

Example code typo

Hi,

This code snippet inside README.md is incorrect

  var protractor = require("gulp-protractor").webdriver;
  gulp.task('webdriver', webdriver);

The webdriver var should be defined instead of protractor

  var webdriver = require('gulp-protractor').webdriver;
  gulp.task('webdriver', webdriver);

Single and double quotes are both used, I think a coding convention must be applied.

Thanks.

Possible to pipe into protractor?

I am browserifying my test files, and would like to pipe them into protractor instead of having to write to a temporary file, which is un-gulplike and un-nodelike. I tried piping the browserify output stream into protractor, but I keep getting errors:

1) Exception loading: /Users/bcherny/Sites/webapp Error
   Message:
     Error: Cannot find module '/Users/bcherny/Sites/webapp'
   Stacktrace:
     Error: Cannot find module '/Users/bcherny/Sites/webapp'
    at require (module.js:380:17)
    at Function.promise (/Users/bcherny/Sites/webapp/node_modules/protractor/node_modules/q/q.js:650:9)
    at _fulfilled (/Users/bcherny/Sites/webapp/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/Users/bcherny/Sites/webapp/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/Users/bcherny/Sites/webapp/node_modules/protractor/node_modules/q/q.js:759:13)
    at /Users/bcherny/Sites/webapp/node_modules/protractor/node_modules/q/q.js:525:49
    at flush (/Users/bcherny/Sites/webapp/node_modules/protractor/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:442:13)
...

Here's the relevant excerpt from my gulpfile:

gulp.task 'e2e', ->

  browserify
    entries: [
      'e2e/tests/one.js'
      'e2e/tests/two.js'
    ]
  .bundle()
  .on 'error', (_.partialRight error, 'Browserify')
  .pipe protractor
    configFile: 'protractor.conf.coffee'
  .on 'error', (_.partialRight error, 'Protractor')

When I use temporary files, everything works fine:

gulp.task 'e2e', ['browserify-e2e'], ->

  gulp
    .src [
      "tmp/**/*.js"
    ]
    .pipe protractor
      configFile: 'protractor.conf.coffee'
    .on 'error', (_.partialRight error, 'Protractor')

gulp.task 'browserify-e2e', ->

  browserify
    entries: [
      'e2e/tests/one.js'
      'e2e/tests/two.js'
    ]
  .bundle()
  .on 'error', (_.partialRight error, 'Browserify')
  .pipe source 'test.js'
  .pipe do buffer
  .pipe gulp.dest "tmp/"

x/post angular/protractor#1858

Change dependency release strategy

The current package.json for dependencies :

"dependencies": {
    "event-stream": "^3.1.4",
    "async": ">=0.7.0 <1.0.0",
    "dargs": ">=0.1.0 <4.0.0",
    "gulp-util": ">=2.2.14 <4.0.0",
    "protractor": "^2.0.0"
  }

You should change this to

"dependencies": {
    "event-stream": "~3.1.4",
    "async": ">=0.7.0 <1.0.0",
    "dargs": ">=0.1.0 <4.0.0",
    "gulp-util": ">=2.2.14 <4.0.0",
    "protractor": "~2.0.0"
  }

By using caret ( ^ ) you enable minor updates without any actions on your own package.
It means that gulp-protractor user can upgrade a major dependency like protractor without any notice.
Minor update add features to a package, theses features can introduce breaking changes.

Using tildes ( ~ ) is a lot more secure and safe, only patch updates are available.

I ran into this case with this protractor issue on windows.

My gulp-protractor was installed since 1 month (so protractor v2.1) then a bunch of new developpers joined the project they installed their dev tools (so gulp-protractor with protractor v2.3 without any changes in gulp-protractor version number) and their e2e tests failed. It takes me some hours to undestand the problem.

Protractor 3.0.0+ support.

Protractor 3.0.0 is out and I tried upgrading today. When attempting to shrinkwrap [email protected] with [email protected] I got an error.

"gulp-protractor requires protractor@'^2.0.0' but will load .... which is version 3.0.0"

I fixed it locally by bumping the dependency to ^3.0.0.

Ignoring onPrepare in my protractor config file

I have the following in my protractor config file. When I run the file locally it works, but when I call the config file using gulp-protractor it ignores it - how do I configure it to call it?

var HtmlReporter = require('protractor-html-screenshot-reporter');

onPrepare: function() {
// Add a screenshot reporter and store screenshots to /results:
jasmine.getEnv().addReporter(new HtmlReporter({
baseDirectory: '../test/e2e/results'
, takeScreenShotsForSkippedSpecs: true
, takeScreenShotsOnlyForFailedSpecs: true
}));
}

New release

Can you release the new version with protractor 2.0 please?

Error: Promise has no method 'match'

Getting the following error from my tests. I'm pretty sure it's an error in the test itself, but the stacktrace doesn't really indicate where/how/why. It looks as though this is an issue in jasmine maybe..? But was wondering if there is something that can be added/fixed here, or a request sent upstream to get a useful stacktrace?

/Users/alias/dev/foo/node_modules/gulp-protractor/node_modules/protractor/node_modules/jasminewd/index.js:277
        if (failureItem.toString().match(jasmineTimeoutRegexp)) {

                                   ^
TypeError: Object Promise::10075 {[[PromiseStatus]]: "fulfilled"} has no method 'match'
    at [object Object].OnTimeoutReporter.reportSpecResults (/Users/alias/dev/foo/node_modules/gulp-protractor/node_modules/protractor/node_modules/jasminewd/index.js:277:36)
    at [object Object].jasmine.NestedResults.totalCount [as reportSpecResults] (/Users/alias/dev/foo/node_modules/gulp-protractor/node_modules/protractor/node_modules/minijasminenode/lib/jasmine-1.3.1.js:1901:39)
    at [object Object].jasmine.Spec.finishCallback (/Users/alias/dev/foo/node_modules/gulp-protractor/node_modules/protractor/node_modules/minijasminenode/lib/jasmine-1.3.1.js:2470:21)
    at [object Object].jasmine.Spec.finish (/Users/alias/dev/foo/node_modules/gulp-protractor/node_modules/protractor/node_modules/minijasminenode/lib/jasmine-1.3.1.js:2475:8)
    at [object Object].onComplete (/Users/alias/dev/foo/node_modules/gulp-protractor/node_modules/protractor/node_modules/minijasminenode/lib/jasmine-1.3.1.js:2504:10)
    at [object Object].jasmine.Queue.next_ (/Users/alias/dev/foo/node_modules/gulp-protractor/node_modules/protractor/node_modules/minijasminenode/lib/jasmine-1.3.1.js:2219:14)
    at [object Object]._onTimeout (/Users/alias/dev/foo/node_modules/gulp-protractor/node_modules/protractor/node_modules/minijasminenode/lib/jasmine-1.3.1.js:2199:18)
    at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
[launcher] Process exited with error code 1

Related?

disabled tests/suites are NOT skipped

When I run my entire set of spec files using 'protractor' command, everything runs as expected. Specifically, suites that I have disabled like so:

xdescribe('my suite',function(){
//run a suite
};

xit('my test', function(){
//run a test
}

..are skipped, as expected.
HOwever, when I try to run the same thing using gulp-protractor, the runner goes through my entire spec directory and then marks what should be skipped tests as failed tests. Any ideas?

incorrect args for protractor from dargs

#3 implemented args for passing options to protractor. However camelCase option names are turned into--camel-casebydargs, making it impossible to pass in arguments likesauceUser`

Update example2 to express 4

Hi,
just an update to express 4 for example
because if you run
npm install --save-dev express
you get the > 4 version.

var express = require('express');
var app = express();
app.use(express.static(__dirname + '/build'));
var server = app.listen('9001');

Btw well done buddy both for the plugin
and for the example2 it saves me a lot of headache :)

Bye

webdriver_update tasks does not work if protractor installed on higher level

My devDependencies were accumulating, totalling 20.000+ files, so I moved them a directory up, in order to share them between different (non-published) NPM modules.
Node is fine with that, as it searches recursively up to find modules. However, webdriver_update expects that Gulp is run in the directory that also contains ./node_modules/.bin/webdriver_manager.cmd.

Next to my rather corner-casey use case, the gulp file might in any case not be executed with the module directory as cwd. Therefore maybe it is handy to replace the hard-coded directory with an actual search for the module?

make --standalone optional for webdriver_update

Protractor allows targeting chrome and firefox with the config directConnect: true. A standalone selenium server is not required in this case. It would be great if we can make this optional and include it in the options being passed in.

Selenium server does not shut down

When allowing the protractor function to run the selenium server itself it says it's shutting down the selenium server but just hangs.

Automatically stop selenium when tests are done

Would be nice if it closed itself once the tests are finished.
I have it shutting down the selenium server but get back an error from orchestrator, I'm going to try to figure it out and submit the PR then (unless someone does it before)

Does gulp-protractor work on windows?

When trying to run protractor using gulp-protractor task, I consistently get:

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:975:11)
at Process.ChildProcess._handle.onexit (child_process.js:766:34)

I am running on windows - should the task be working? I am running a stand-alone web-driver, and I have verified that I can run protractor manually using the same protractor config.

Any advice/assistance is much appreciated.

Can't pass Gulp's matched files to protractor

I'm trying to let Gulp tell protractor tell what files to process:

gulp.task('test', ['scripts'], function() {
  return gulp.src(['./src/test/**/*.js'])
    .pipe(plugins.protractor({
        configFile: './protractor.config.js'
    }))
    .on('error', function(e) { throw e });
});

I've commented out the spec key in the protractor config. But running the tests results in an error:

[project_dir]/node_modules/protractor/lib/runner.js:376
    throw new Error('Spec patterns did not match any files.');
          ^
Error: Spec patterns did not match any files.

How do I let Gulp decide which files to test?

args not working

on windows 7: defining

protractor({
configFile : "..."
args : {
}

it fails ongul-protractor:43 args.push("--specs")

object<#> has no method push

several combinations does not work.
I expect options : {} is incorrect

Gulp tasks without gulp-protractor

First of all thanks a lot for this plugin. It got me started with protractor in no time. After a while I realized though that protractor can be started without the plugin pretty easy. I thought I'd share the code, maybe it can help someone for whom gulp-protractor does not work.

var path = require('path');
var child_process = require('child_process');

function getProtractorBinary(binaryName){
  var winExt = /^win/.test(process.platform)? '.cmd' : '';
  var pkgPath = require.resolve('protractor');
  var protractorDir = path.resolve(path.join(path.dirname(pkgPath), '..', 'bin'));
  return path.join(protractorDir, '/'+binaryName+winExt);
}

gulp.task('protractor-install', 'Install Selenium Webdriver', function(done){
  child_process.spawn(getProtractorBinary('webdriver-manager'), ['update'], {
    stdio: 'inherit'
  }).once('close', done);
});

gulp.task('protractor-run', 'Run end-to-end tests using protractor', function (done) {
  var argv = process.argv.slice(3); // forward args to protractor
  child_process.spawn(getProtractorBinary('protractor'), argv, {
    stdio: 'inherit'
  }).once('close', done);
});

This code snippets could be included in the readme, like: "You can use gulp-protractor like this .... or you can do it without the plugin like so ...". If you agree I could prepare a PR.

Hanging with `Shutting down selenium standalone server.` message

Hi there,
First off, thanks for putting this together!

Now my issue: When telling protractor to initialize selenium, by specifying seleniumServerJar, and all tests pass, it hangs with this message: Shutting down selenium standalone server. Running it manually, using protractor's command line, it works just fine. Any thoughts?

add protractor arguments support

Refer to grunt-protractor-runner:
it would allow one pass arguments to protractor so that test can be run on travis-ci.

I'd purpose add one args(type: Array) option and pass it directly with spawn. One should refer to protractor docs to learn how to use args array.

'Quiter' logging?

Hey there, just came to ask if theirs an easy way to limit the logging in the console, it's a little verbose for my tastes and most of it has nothing to do with my tests!

Thanks for the great plug-in,

Ben

webdriver_update does not update IE

The line

webdriver_update.bind(null, ["ie", "chrome"])

does not get executed. Upon calling webdriver_update only the selenium .jar and the chromedriver .zip are downloaded/checked if latest.

My current workaround is

var webdriverUpdate = gulpProtractor.webdriver_update_specific({
    browsers: ['chrome', 'ie']
});

Running 'gulp protractor-run' doesn't run

When I run gulp protractor-run, I get the following:

[16:10:04] Using gulpfile ~/Documents/OtherLevels/portal-plusone/gulpfile.js
[16:10:04] Starting 'protractor-run'...
**you must either specify a configuration file or at least 3 options. See below for the options:

Usage: protractor [configFile] [options]
configFile defaults to protractor.conf.js
The [options] object will override values from the config file.
See the reference config for a full list of options.

Options:
  --help                                             Print Protractor help menu                               
  --version                                          Print Protractor version                                 
  --browser, --capabilities.browserName              Browsername, e.g. chrome or firefox                      
  --seleniumAddress                                  A running selenium address to use                        
  --seleniumServerJar                                Location of the standalone selenium jar file             
  --seleniumPort                                     Optional port for the selenium standalone server         
  --baseUrl                                          URL to prepend to all relative paths                     
  --rootElement                                      Element housing ng-app, if not html or body              
  --specs                                            Comma-separated list of files to test                    
  --exclude                                          Comma-separated list of files to exclude                 
  --verbose, --jasmineNodeOpts.isVerbose             Print full spec names                                    
  --stackTrace, --jasmineNodeOpts.includeStackTrace  Print stack trace on error                               
  --params                                           Param object to be passed to the tests                   
  --framework                                        Test framework to use: jasmine, cucumber or mocha        
  --resultJsonOutputFile                             Path to save JSON test result                            
  --troubleshoot                                     Turn on troubleshooting output                           
  --elementExplorer                                  Interactively test Protractor commands                   
  --debuggerServerPort                               Start a debugger server at specified port instead of repl

[16:10:04] 'protractor-run' errored after 93 ms
[16:10:04] Error: 1
  at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10)
  at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15)
  at Gulp.emit (events.js:107:17)
  at Gulp.Orchestrator._emitTaskDone (/Users/ryandrake/Documents/OtherLevels/portal-plusone/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
  at /Users/ryandrake/Documents/OtherLevels/portal-plusone/node_modules/gulp/node_modules/orchestrator/index.js:275:23
  at finish (/Users/ryandrake/Documents/OtherLevels/portal-plusone/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
  at ChildProcess.cb (/Users/ryandrake/Documents/OtherLevels/portal-plusone/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
  at ChildProcess.g (events.js:199:16)
  at ChildProcess.emit (events.js:110:17)
  at maybeClose (child_process.js:1008:16)
  at Process.ChildProcess._handle.onexit (child_process.js:1080:5)

I'm wondering what part of config/setup am I missing? Your README isn't helpful in this case.

Issues on OSX!

I wanted to document how I got this to work on OSX, in case anyone needs help in the future. I'm using Protractor v1.7.0 and gulp-protractor v0.0.12. @mllrsohn feel free to move this somewhere else.

I started by installing gulp-protractor, and using it with the following task:

gulp.task ('e2e', function(){
  gulp
    .src(SRCDIR + '/**/*.e2e.js')
    .pipe(protractor({
      configFile: 'protractor.conf.coffee'
    })
})

When I ran gulp e2e, I got the following error:

[chrome #1a] Could not find chromedriver at /Users/bcherny/Sites/webapp/node_modules/protractor/selenium/chromedriver.exe

Googling wasn't very helpful, but installing selenium was:

npm i selenium-standalone-jar --save-dev

I then added Selenium to my protractor.conf.coffee, per your docs:

seleniumServerJar: './node_modules/selenium-standalone-jar/bin/selenium-server-standalone-2.44.0.jar'

Running gulp e2e again, I got the following error:

[chrome #1a] /Users/bcherny/Sites/webapp/node_modules/protractor/lib/driverProviders/local.js:54
[chrome #1a]         throw new Error('Could not find chromedriver at ' +
[chrome #1a]               ^
[chrome #1a] Error: Could not find chromedriver at /Users/bcherny/Sites/webapp/node_modules/protractor/selenium/chromedriver

The solution was to install the missing dependency:

npm i chromedriver --save-dev

And add it to my protractor.conf.coffee, as per the protractor docs:

chromeDriver: './node_modules/chromedriver/bin/chromedriver'

Finally, gulp e2e ran my tests successfully.

Hopefully this helps someone!

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.