Nightwatch.js를 처음 설치하려고합니다. 다음과 같은 자습서를 진행하고 있습니다. https://github.com/dwyl/learn-nightwatch셀렌 서버에서 새 세션을 가져 오는 중 오류가 발생했습니다.
불행히도 나는 장애물에 부딪 쳤고 해결할 도움이 필요합니다.
셀렌 서버에서 새 세션을 가져 오는 중 오류가 발생했습니다. 연결이 거부되었습니다! Selenium 서버가 시작 되었습니까?
nightwatch.conf.js
module.exports = {
"src_folders": [
"test"// Where you are storing your Nightwatch e2e/UAT tests
],
"output_folder": "./reports", // reports (test outcome) output by nightwatch
"selenium": {
"start_process": true, // tells nightwatch to start/stop the selenium process
"server_path": "./node_modules/nightwatch/bin/selenium.jar",
"host": "127.0.0.1",
"port": 4444, // standard selenium port
"cli_args": {
"webdriver.chrome.driver" : "./node_modules/nightwatch/bin/chromedriver"
}
},
"test_settings": {
"default": {
"screenshots": {
"enabled": true, // if you want to keep screenshots
"path": './screenshots' // save screenshots here
},
"globals": {
"waitForConditionTimeout": 5000 // sometimes internet is slow so wait.
},
"desiredCapabilities": { // use Chrome as the default browser for tests
"browserName": "chrome"
}
},
"chrome": {
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true // set to false to test progressive enhancement
}
}
}
}
구성 설정에 기초 기니 pig.js
module.exports = { // addapted from: https://git.io/vodU0
'Guinea Pig Assert Title': function(browser) {
browser
.url('https://saucelabs.com/test/guinea-pig')
.waitForElementVisible('body')
.assert.title('I am a page title - Sauce Labs')
.saveScreenshot('ginea-pig-test.png')
.end();
}
};
. 나는 그것을 가능한 한 기본으로 유지했다. 다른 셀렌 서버가 시작되었다고 말하는 곳을 정확히 찾아 낼 수 없습니다. 어떤 아이디어?
편집 : 시간 초과 오류 당신의 nightwatch.json 파일에서
오류 관련 스크린 샷은 Chrome (또는)의 주위에 무언가에 암시하는 것처럼 보입니다. 그러나 완전한 오류 내용을 제대로 포함하지 않았기 때문에 말하기가 어렵습니다. 나는 당신이 먼저 오류를 좀 더 자세히 보아서 (또는) 문제의 완전한 오류 내용을 공유함으로써 일어난 일을 쉽게 찾을 수 있도록 제안 할 것이다. –
@KrishnanMahadevan 여기 전체 오류 내용을 가진 제 질문입니다, 도와 드릴까요? http : // stackoverflow.com/questions/40454321/running-error-running-selenium-server-via-nightwatch –