selenium - Check for child tag inside parent tag -


is possible know if parent contains child specific class name. sample code

<div id="parent_tag">    <div id="div1">       <span>title 1</span>    </div>    <div id="div2">       <b>title 2</b>    </div>    <div id="div3">       <span>title 3</span>    </div> </div> 

i trying access "span tag" title 3. know can specifying id. if want generically (i.e elements). first approach should "i span tag inside div". don't know how that? please help.

try xpath:

//div/span[text()="title 3"] 

Comments

Popular posts from this blog

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -

scikit learn - python sklearn KDTree with haversine distance -