I have solved this problem by completely re installing node.js. After re installing express installed just fine.
Catching Mocha Assertion Error with Selenium on Windows
Frage
I am trying to run through a simple tutorial on how to use selenium webdriver. The following code works fine when the test passes but when I have the assert.equal fail I get a urgly error message in my shell.
var assert = require('assert'),
test = require('selenium-webdriver/testing'),
webdriver = require('selenium-webdriver');
test.describe('Google Search', function() {
test.it('should work', function() {
var driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build();
driver.get('http://www.yahoo.com');
var searchBox = driver.findElement(webdriver.By.name('p'));
searchBox.sendKeys('simple programmer');
searchBox.getAttribute('value').then(function(value) {
assert.equal(value, 'simple programmer');
});
driver.quit();
});
});
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow