<a href="https://www.xyz.com/Vertical-Striped-short-Slve-pant-with-Chest-Pocket-dsdjj.html">Vertical-Striped-short-Slve-pant-with-Chest-Pocket-dsdjj
<br><b>Select Size:</b> S</a>
I am trying to fetch the text of anchor tag, but I am getting the text with br tag also.
I am using getText()
method of selenium API to fetch the text
Please help me to do solve
Note : I am expecting to get "Vertical-Striped-short-Slve-pant-with-Chest-Pocket-dsdjj"
Getting text : "Vertical-Striped-short-Slve-pant-with-Chest-Pocket-dsdjj Select Size:S"