Reputation: 408
I am having trouble getting my protractor tests to execute. No matter what I enter after starting webdriver, it says "Attempting to shut down nicely".
Jameson Hill@DESKTOP-GP6CRIB MINGW64 ~/desktop/test-protractor
$ webdriver-manager start
[11:34:27] I/start - java -Dwebdriver.chrome.driver=C:\Users\Jameson Hill\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.29.exe -Dwebdriver.gecko.driver=C:\Users\Jameson Hill\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.15.0.exe -jar C:\Users\Jameson Hill\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.3.1.jar -port 4444
[11:34:27] I/start - seleniumProcess.pid: 7092
11:34:27.859 INFO - Selenium build info: version: '3.3.1', revision: '5234b32'
11:34:27.859 INFO - Launching a standalone Selenium Server
2017-04-19 11:34:27.874:INFO::main: Logging initialized @212ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:34:27.937 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:34:27.937 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
11:34:27.937 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:34:27.937 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
11:34:27.937 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform WIN10
2017-04-19 11:34:27.984:INFO:osjs.Server:main: jetty-9.2.20.v20161216
2017-04-19 11:34:28.015:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@685cb137{/,null,AVAILABLE}
2017-04-19 11:34:28.093:INFO:osjs.AbstractConnector:main: Started ServerConnector@49993335{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2017-04-19 11:34:28.093:INFO:osjs.Server:main: Started @432ms
11:34:28.093 INFO - Selenium Server is up and running
protractor conf.js
[11:34:38] I/start - Attempting to shut down selenium nicely
Here is my config and spec files:
describe('Protractor demo app', function() {
var firstNumber = element(by.model('first'));
var secondNumber = element(by.model('second'));
var goButton = element(by.id('gobutton'));
var latestResult = element(by.binding('latest'));
var history = element.all(by.repeater('result in memory'));
function add(a, b) {
firstNumber.sendKeys(a);
secondNumber.sendKeys(b);
goButton.click();
}
beforeEach(function() {
browser.get('http://juliemr.github.io/protractor-demo/');
});
it('should have a history', function() {
add(1, 2);
add(3, 4);
expect(history.last().getText()).toContain('1 + 2');
expect(history.first().getText()).toContain('3 + 4');
});
});
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['spec.js'],
capabilities: {
browserName: 'chrome'
}
}
Upvotes: 1
Views: 3298
Reputation: 3268
No matter what I enter after starting webdriver, it says "Attempting to shut down nicely".
Based on that log you submitted, it looks like you are trying to enter the protractor
command in the same window that is running your local selenium server.
If that is true, you should know you aren't supposed to enter anything into the console after starting your selenium server. Simply hitting "Enter" while on your server console will shut it down.
After starting your server, you need to open a new console to execute commands such as protractor
.
Upvotes: 6