1

I'm bringing this into discussion here, since I had started this conversation over GithubIssue 2630, Basically I'm having problems with the integration of Protractor and Cucumber, I had even tried to downgrade to a older versions for both but the same thing happens, here's an explanation of what I did so far:

I had uninstalled everything and started from scratch. I started by installing Protractor, Cucumber and Webdriver globally and I can see this error, same as before, when I run the protractor command.

$ protractor conf.js
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://192.168.0.104:64737/wd/hub
[launcher] Error: TypeError: undefined is not a function
    at /usr/local/lib/node_modules/protractor/lib/frameworks/cucumber.js:150:36
    at Function.promise (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:650:9)
    at /usr/local/lib/node_modules/protractor/lib/frameworks/cucumber.js:147:14
    at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:759:13)
    at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:525:49
    at flush (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:355:11)
[launcher] Process exited with error code 100

``` test21

Then I've installed all locally, running npm install, and I got this error

[launcher] Process exited with error code 1
/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:126
                    throw e;
                          ^
Error: No selenium server jar found at the specified location (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/selenium/selenium-server-standalone-2.47.1.jar). Check that the version number is up to date.
    at LocalDriverProvider.addDefaultBinaryLocs_ (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/driverProviders/local.js:37:11)
    at LocalDriverProvider.setupEnv (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/driverProviders/local.js:71:8)
    at Runner.run (/Users/brunosoko/Documents/Dev/Personal/olapic-test2/node_modules/protractor/lib/runner.js:261:31)
    at TaskRunner.run (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/taskRunner.js:123:19)
    at createNextTaskRunner (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/launcher.js:223:20)
    at /Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/launcher.js:246:7
    at _fulfilled (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:759:13)
    at /Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:573:44

Which I resolved by installing locally webdriver ./node_modules/.bin/webdriver-manager update Then I ran ./node_modules/.bin/protractor conf.js and I'm getting the same error as above, for cucumber.js:150:36

Later, I tried to uninstall globally framework, npm uninstall -g protractor and npm uninstall -g cucumber

But the same error happens! I'm not sure what am I doing wrong!

Bruno Soko
  • 624
  • 6
  • 20

1 Answers1

0

I'm not sure what is wrong with your specific situation, but I have created a bare minimum example of cucumber 0.8.1 working with the yet to be released version of protractor here - https://github.com/darrinholst/protractor-cucumber-example. Hope this helps.

git clone https://github.com/darrinholst/protractor-cucumber-example
cd protractor-cucumber-example
npm install
npm test
Darrin Holst
  • 696
  • 5
  • 7
  • It worked! I'm still unsure what was wrong with what I did! I was comparing with your code and there's no difference! I did was able to downgrade to "cucumber": "~0.6.0","protractor": "1.4.0". And now I was dealing with another issues! but the important thing is that at least I got it to work! Thanks for your help. can you recommend a tutorial to run this with synchronous? – Bruno Soko Oct 27 '15 at 14:05
  • What does "run this with synchronous" mean? – Darrin Holst Oct 27 '15 at 15:21
  • I meant, that I want to use page-object pattern on this non-angular app... and I'm having a hard time to implement it, 'cause it seems not to get working... not sure if it's due that I'm using older versions of cucumber and protractor (since your fixes are not just yet released with protractor) – Bruno Soko Oct 27 '15 at 16:34
  • hey @Darrin Holst, I've created a new question here, http://stackoverflow.com/questions/33389270/cannot-add-new-given-when-then-getting-error-syntaxerror-invalid-regular-expr can you assist me there? – Bruno Soko Oct 28 '15 at 12:29