In cases when we have a dynamic content population in a span tag, for e.g.,
.detail
%label Sku:
%span.#sku.detail= @deal.sku
When the deal in the above example doesn't have sku associated, the span element in the html will be as below without any content in it.
<div class="detail">
<label>Sku:</label>
<span id="sku" class="detail"></span>
</div>
If the SitePrism element is defined to look for this for e.g.,
element :sku, "#sku"
and if "@sample_page" is reference to my Site Prism page, and I refer sku as
@sample_page.sku.text
we will get Capybara::ElementNotFound Exception