angularjs-eclipse: Unable to run protractor test case from eclipse

Hi All,

I am new to Protractor.I am not sure, if this is the right place to discuss Protractor issue. Please direct me to the right group if this is not the right place for this discussion.

I am unable to run protractor test case from eclipse. I am able to see Protractor option in my eclipse (Run as> Protractor) but when I run, nothing happens.

Please find the steps followed by me. Pre requisite I used

  1. Eclipse MARS 4.5
  2. Node.js version V4.4.3 LTS installed
  3. Installed Protractor globally using npm
  4. Installed webdriver-manager update.

Steps followed to run to create project:

  1. Created a new project (Static web project)
  2. Go to Help>Install New software
  3. Copy the url : http://oss.opensagres.fr/angularjs-eclipse/1.1.0/.
  4. Select all and Click on Finish.
  5. Right click on the Project and Hover over to Configure and click on “Convert to AngularJS project”
  6. configure cli.js in eclipse. image
  7. Made sure Protractor is check in Project> Properties (Right on new Project created>Properties> Javascript>Tern>Modules>Protractor is checked) image 8.Create two .js file (conf.js and to-do.js) conf.js class exports.config = { //seleniumAddress: ‘http://localhost:4444/wd/hub’, directConnect: true, specs: [‘to-do.js’] };

to-do.js Class describe(‘angularjs homepage todo list’, function() { it(‘should add a todo’, function() { browser.get(‘https://angularjs.org’);

element(by.model('todoList.todoText')).sendKeys('write first protractor test');
element(by.css('[value="add"]')).click();

var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);
expect(todoList.get(2).getText()).toEqual('write first protractor test');

// You wrote your first test, cross it off the list
todoList.get(2).element(by.css('input')).click();
var completedAmount = element.all(by.css('.done-true'));
expect(completedAmount.count()).toEqual(2);

}); });

  1. Open command prompt and run webdriver-manager start
  2. right click on conf.js in eclipse and run as>Protractor image

Result: No action. Console remain blank.

Please help. Any help is appreciated.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 49 (4 by maintainers)

Most upvoted comments

Hi @sigudd @chudyed , I have check the above post by @angelozerr after I have made my hand dirty with doing something which i dont know exactly. In my preference, above checkboxes are not selected.

What I have done?

  1. Copy the latest nodejs exe
  2. Navigate to the following path C:\Users\XXXXXX.p2\pool\plugins\tern.eclipse.ide.server.nodejs.embed.win32.win32.x86_64_1.2.0.201606160856\node-v4.2.4-win32-x86_64
  3. Rename the original exe as a backup
  4. Paste the latest nodejs exe
  5. Now the name is same but exe is latest

I am by far not a developer so no idea but as a wild guess it is a problem with the tern plugin embed nodejs.

@chudyed after I set a new location of node.js like you said and run conf.js a get an error: Sunny@ I am expecting that you are able to run protractor through cmd prompt. Try to run the webdriver-manager update. If it does not solve the problem, then check the browser version of chrome and see if it the latest as I have see some post related to latest browser issue. Then, no idea…I will try to reproduce this first and will keep doing my hit and trial.

Do let me know if it help.

@angelozerr I am not able to chose the node js version.Can u pls help me out as i have been stuck on this issue for past 1 week.This is not a permanent solution because we have to set the node js path again and again while running the test.Anyone can provide me the permanent solution for the this problem /home/smart/workspace/DemoProtractor/node_modules/protractor/built/logger.js:75 info(…msgs) { ^^^

SyntaxError: Unexpected token … at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:414:25) at Object.Module._extensions…js (module.js:442:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:313:12) at Module.require (module.js:366:17) at require (module.js:385:17) at Object.<anonymous> (/home/smart/workspace/DemoProtractor/node_modules/protractor/built/configParser.js:5:18) at Module._compile (module.js:435:26) at Object.Module._extensions…js (module.js:442:10)