jquery Programming Glossary: this.evaluate
CasperJs and Jquery with chained Selects http://stackoverflow.com/questions/16283908/casperjs-and-jquery-with-chained-selects true logLevel 'debug' open url casper.start 'http thewebsite.com' casper.then function select option on first select this.evaluate function valueOptionSelect 'select#s1' .val valueOptionSelect 'select#s1' .trigger 'change' optionFirstSelect wait until.. .trigger 'change' optionFirstSelect wait until the second select is populated this.waitFor function check return this.evaluate function return document.querySelectorAll 'select#s2 option' .length 1 function then select option on second select this.evaluate.. function return document.querySelectorAll 'select#s2 option' .length 1 function then select option on second select this.evaluate function valueOptionSelect 'select#s2' .val valueOptionSelect 'select#s2' .trigger 'change' optionSecondSelect wait..
|