I'm using CasperJS, and need to select a class that contains spaces. Did some googling but not getting what's going wrong.
HTML content :
<div id="member-1" class="letters vcard known">
...
</div>
CasperJS assertion
casper.test.assertExists('div.letters vcard known');
Also tried
casper.test.assertExists('div.letters\ vcard\ known');
Results
FAIL Found an element matching: div.letters vcard known
# type: assertExists
# subject: false
# selector: "div.letters vcard known"
[warning] [phantom] looks you did not use begin() which is mandatory since 1.1
⚠ looks you did not use begin() which is mandatory since 1.1
FAIL AssertionError: Found an element matching: div.letters vcard known
# type: error
# subject: false
# error: {"message":"Found an element matching: div.masthead vcard contact","name":"AssertionError","result":{"success":false,"type":"assertExists","standard":"Found an element matching: div.letters vcard known","file":null,"doThrow":true,"values":{"subject":false,"selector":"div.letters vcard known"},"suite":"Untitled suite in null","time":1},"line":301,"sourceId":166856896,"sourceURL":"../modules/tester.js","stack":"AssertionError: Found an element matching: div.letters vcard known\n at assert (../modules/tester.js:301)\n at assertExists (../modules/tester.js:493)\n at sourceToJSON.js:41\n at runStep (../modules/casper.js:1518)\n at checkStep (../modules/casper.js:368)","stackArray":[{"function":"assert","sourceURL":"../modules/tester.js","line":301},{"function":"assertExists","sourceURL":"../modules/tester.js","line":493},{"sourceURL":"sourceToJSON.js","line":41},{"function":"runStep","sourceURL":"../modules/casper.js","line":1518},{"function":"checkStep","sourceURL":"../modules/casper.js","line":368}]}