HTML Code:
<p class="target">
<span>I am Span 1 of target_value 1*</span>
<span>I am Span 2 of target_value 2*</span>
target_value /* I want to get this value in cypress test case */
</p>
Note*: Both the texts "I am Span 1 of target_value 1" and "I am Span 2 of target_value 2" are dynamic and can change at times.But these spans might contain the text "target_value". In cypress test case how can I select the text "target_value" in
directly(not in its children) and check if it is rendering or not. I just want to get the main text value which is not inside any of its children element.