1
votes

I've just installed protractor on my fedora work station. My tests work fine on Windows 7 and OS X, but on fedora I get this error:

Message: Failed: Object [object Object] has no method 'then' Stack: Error: Failed: Object [object Object] has no method 'then' at /usr/lib/node_modules/protractor/node_modules/jasminewd2/index.js:102:16 at [object Object].promise.ControlFlow.runInFrame_ (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1877:20) at [object Object].promise.Callback_.goog.defineClass.notify (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:2464:25) at [object Object].promise.Promise.notify_ (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:563:12)

Obviously the difference between the work stations is huge. Even node runs in different versions (0.10.36 on fedora). But maybe someone has the same problems?

1
You’re gonna need to show more than this error… Are you using the same protractor version on both machines? If you want the same behavior on both machines, you’re gonna have to use the same versions of everything.Bertrand Marron
Show your test and on which line does it fail?alecxe

1 Answers

4
votes

You are getting this error because you are running Protractor 2.0 on your workstation, and 1.x on your other machines. Protractor 2.0 has a breaking change that removes element.then. You'll need to update your tests to address this change.