this.test.assert(this.keyboardEvent('keypress','#test1','0'),'CasperUtils.keyboardEvent() can dispatch a keypress event');
this.test.assert(this.keyboardEvent('keydown','#test1','1'),'CasperUtils.keyboardEvent() can dispatch a keydown event');
...
...
@@ -11,8 +11,12 @@ casper.then(function() {
this.keyboardEvent('keydown','#test2','Down');
varresults=this.getGlobal('results');
this.test.assertEvalEquals(function(){returndocument.querySelector('#test1').value;},"012",'CasperUtils.keyboardEvent() can set the value of a textarea');
this.test.assertEvalEquals(function(){returndocument.querySelector('#test2').selectedIndex;},3,'CasperUtils.keyboardEvent() can update the value of a select');
this.test.assertEvalEquals(function(){
returndocument.querySelector('#test1').value;
},"012",'CasperUtils.keyboardEvent() can set the value of a textarea');