I am trying to navigate to the sibling <p>
element using Selenium that has no id/class attributes. This is my HTML:
<div class="content1">
<div class="bold">
<a href="test">test</a>
</div>
<p>
<span class="test two">Nuevo</span>
</p>
<div class="bold2">
<a href="test">test</a>
</div>
<p>
i want to get this text
</p>
</div>
This is my selenium code:
element = driver.findElement(By.xpath("content1/p[2]"));
can anyone help me correct my selenium code?