Hope someone can help me here?
Having an issue getting text that’s located inside a tag but After another tag…
<li><b>**Duration Held:**</b> 5 Years </li>
I need to return the “5 Years” part of the Text but selenium.getText() returns the whole <li> contents, which is correct, but I need the text after the </b> tag but can’t figure out a way to achieve this task?
Has anyone come across this type of scenario, if so, what was done to get the text after a </b> but still inside the <li> tag ???
I’m stumped, Any help is appreciated!
Cheers!
You can easily use regex to extract what you want. such as;