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

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -