question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run protractor test case from eclipse

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:49 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
Sunny-Teocommented, Feb 23, 2017

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.

2reactions
anjalisingh824commented, Apr 6, 2017

@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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to Configure protractor using Eclipse - Stack Overflow
I was able to configure protractor tests in eclipse and below are the steps which I performed including one error that I resolved...
Read more >
4: How to run Protractor in Eclipse - YouTube
Eclipse is easy to use, free IDE to start work on. ... Your browser can't play this video. ... Protractor Tutorial - 3:...
Read more >
Unable to run Protractor tests in Microsoft Edge
When I run the tests in Chrome and Firefox the behavior is fine (tests run with expected results). However, with MS Edge the...
Read more >
TestNG Tutorials for Selenium Webdriver - Learn Automation
In this page, I will walk you through TestNG Tutorials which will help you to write efficient scripting in Selenium Webdriver.
Read more >
How To Debug Protractor Tests for Selenium Test Automation?
The Selenium test automation scenarios follow a sequence of actions and the output of the current test cases serves as the input of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found