       document.body.textContent or document.body.innerText
 
     @assert haystack.indexOf(needle) != -1,
-      'expected text #{this} to be in the document, but it was not'
-      'expected text #{this} to not be in the document, but it was found'
+      "expected text #{needle} to be in the document, but it was not"
+      "expected text #{needle} to not be in the document, but it was found"
 
   ###
     @@@@ textMatch

  _addProperty 'visible', () ->
    selector = @_obj
    @assert casper.visible(selector),
        'expected selector #{this} to be visible, but it was not',
        'expected selector #{this} to not be visible, but it was'


    title = casper.getTitle()
    @assert _matches(matcher, title),
        "expected title #{matcher} to match #{title}, but it did not",
        "expected title #{matcher} to not match #{title}, but it did",

  ###
    @@@@ matchCurrentUrl
