Strange example
LinusU opened this issue · 1 comments
LinusU commented
The example includes a return
statement that always gets run before the first line. I'm not sure if driver.quit()
is suppose to be run thought, probably not since that would shut down the driver before the test is finished?
I think that return
should be removed.
var drool = require('drool');
var assert = require('assert');
var driver = drool.start({
chromeOptions: 'no-sandbox'
});
return drool.flow({
repeatCount: 100,
setup: function() {
driver.get('http://todomvc.com/examples/backbone/');
},
action: function() {
driver.findElement(drool.webdriver.By.css('#new-todo')).sendKeys('find magical goats', drool.webdriver.Key.ENTER);
driver.findElement(drool.webdriver.By.css('#todo-list li')).click();
driver.findElement(drool.webdriver.By.css('.destroy')).click();
},
assert: function(after, initial) {
assert.equal(initial.nodes, after.nodes, 'node count should match');
}
}, driver)
driver.quit();
samccone commented
You are right sorry this is my mistake