At the moment I'm using the casper.evaluate function to do something like this (Using CoffeeScript)
bool = casper.evaluate ->
document.querySelector('button selector').checked
This seems to work fine but I'm wondering if there's a built in casper method that I could use to retrieve the checked property of a checkbox/radio element? I've tried using getElementAttribute()
but it won't detect 'checked' as an attribute. Also it is not listed in the JSON object retrieved from getElementInfo()
.