I'm trying to write an evaluate function in CasperJS, but I'm running into an issue when I call a click event. Here's a quick code block to illustrate the problem:
returnVal = casper.evaluate(() ->
document.querySelector('.class').click()
return true
returnVal
is always null in the above, even when the class exists.
In my actual code I have a good deal of code to run, and I want to do multiple click events throughout.
Is it the design of CasperJS to immediately return when a click()
is called? Or am I missing something really simple?