My HTML looks like :
<div id="cc" class="col-md-6" _ngcontent-c12="">
<h5 _ngcontent-c12="">Blah Blah</h5>
My Answer
</div>
When I use :
driver.findElement(By.id("cc")).getText()
It returns me "Blah Blah My Answer"
I need only "My Answer" to be returned. Is there a way to do that through Selenium WebDriver?