0
運行硒節點JS測試情況下得到錯誤錯誤:ECONNREFUSED連接ECONNREFUSED。運行節點JS硒測試用例得到錯誤錯誤:ECONNREFUSED連接ECONNREFUSED 127.0.0.1:63528
測試用例
var assert = require('assert'),
test = require('selenium-webdriver/testing'),
webdriver = require('selenium-webdriver');
test.describe('Google Search', function() {
test.it('should work', function (done) {
this.timeout(100000);
var driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build();
driver.get('http://www.google.com');
var searchBox = driver.findElement(webdriver.By.name('q'));
searchBox.sendKeys('simple programmer');
searchBox.getAttribute('value').then(function (value) {
assert.equal(value, 'simple programmer');
});
driver.quit();
done();
});
});
而且如下
錯誤的錯誤堆棧跟蹤:在ECONNREFUSED連接的ClientRequest ECONNREFUSED 127.0.0.1:63528 。 (node_modules \ selenium-webdriver \ http \ index.js:238:15)