@world.absorb
def css_contains_text(css_selector, partial_text, index=0):
 if partial_text:
  wait_for((lambda _: css_html(css_selector, index=index)), timeout=8)
 actual_text = css_html(css_selector, index=index)
 return (partial_text in actual_text)

@ world . absorb def css_contains_text ( css_selector , partial_text , index = 0 ) : if partial_text : wait_for ( ( lambda _ : css_html ( css_selector , index = index ) ) , timeout = 8 ) actual_text = css_html ( css_selector , index = index ) return ( partial_text in actual_text )
return a boolean indicating whether the element with css_selector contains partial_text .