Can we write protractor test/scripts in eclipse. Enabling syntax highlighting , intellisense etc. for Javascript in Eclipse.
Adding more content to Nick's answer , after the step 3. Click on convert to tern project you will ask to select the modules, leave the one's that automatically selected and in addition select
Angular JS Browser Browser extention Protractor Jasmine.
Then in project level write click and create a new file samfirstspec.js Copy https://www.protractortest.org/#/tutorial the content in Step 0 - write a test
// samfirstspec.js
describe('Protractor Demo App', function() {
it('should have a title', function() {
browser.get('http://juliemr.github.io/protractor-demo/');
expect(browser.getTitle()).toEqual('Super Calculator');
});
});
Next step is creating a configuration file.In project level write click and create a new file Copy the following into myconfig.js
// conf.js
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['samfirstspec.js']
}
This configuration tells Protractor where your test files (specs) are, and where to talk to your Selenium Server (seleniumAddress). It specifies that we will be using Jasmine for the test framework. It will use the defaults for all other configuration. Chrome is the default browser.
The next step is running the script so go to project source code location via cmd
F:\Learning\Repositories\protractor-sam-test-scripts\EclipsePro
In cmd type
protractor myconfig.js
refer this too - https://www.protractortest.org/#/tutorial
Yes, you can use protractor plugin in eclipse.
Now create a project in eclipse
Now you are ready to write scripts using protractor.