I am using Protractor for end-to-end Testing with non-angular app.
So Once I have written in protractor.conf.js file as-
exports.config = {
directConnect: true,
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
// Framework to use. Jasmine is recommended.
framework: 'jasmine',
// Spec patterns are relative to the current working directory when
// protractor is called.
specs: ['example_spec.js'],
// Options to be passed to Jasmine.
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
Then it works fine for me.
After that I have made some changes like-
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
// Framework to use. Jasmine is recommended.
framework: 'jasmine',
// Spec patterns are relative to the current working directory when
// protractor is called.
specs: ['example_spec.js'],
// Options to be passed to Jasmine.
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
Then It start with selenium server with port and test cases run successfully.
So My Question is that-
What is the diffrence between both the ways? I know when we use directConnect:true, it does not start selenium server, then use chrome driver directly, and test cases run faster than other way?
When protractor can do testing without selenium server, why we need it? What selenium server do in protrator testing?