For some reason the test I had working a couple days ago no longer works. Ive kept up to date with nightwatch revisions and upgraded to Firefox 33 and Selenium 2.44.0.
});
Which works fine for the first 4 clicks in the test, but then I get down to two clicks that seem to register in Selenium, because it throws no errors, does not tell me the elements dont exist or anything, and keeps moving on with the test. The problem is, the clicks didnt actually happen. The selenium server dumps after a while saying it cant find the new element its looking for but thats because the element wont exist unless the two previous clicks occur.
Here is the code in question, and I have verified all the selectors are correct manually, and they havent changed from when the test last worked.
client.element('css selector', 'input[id='+input["region"]+']', function(element){
if(element.error){
console.error(element.error)
}
else {
//This click and the next dont register
client.elementIdClick(element.value.ELEMENT, function () {
client.element('css selector', 'button[type=submit]', function (element) {
if (element.error) {
console.log(element.error)
}
else {
client.elementIdClick(element.value.ELEMENT);
}
});
var startTime = new Date().getTime();
client.useCss();
//Wait for the DOM complete button or timeout
client.waitForElementPresent("button[name=connect]", 3600000, function(){
//This is where the bug happens, it never finds the button
})
});
}
});