@world.absorb
def css_has_text(css_selector, text, index=0, strip=False):
 if text:
  wait_for((lambda _: css_text(css_selector, index=index)))
 actual_text = css_text(css_selector, index=index)
 if strip:
  actual_text = actual_text.strip()
  text = text.strip()
 return (actual_text == text)

@ world . absorb def css_has_text ( css_selector , text , index = 0 , strip = False ) : if text : wait_for ( ( lambda _ : css_text ( css_selector , index = index ) ) ) actual_text = css_text ( css_selector , index = index ) if strip : actual_text = actual_text . strip ( ) text = text . strip ( ) return ( actual_text == text )
return a boolean indicating whether the element with css_selector has text .