I need to select a specific text from a DIV, here is the DIV source:
<html>
<div class="roamingHostIdContainer ng-binding">
Host ID: 3K9X-Q8LD-6AX6-3UGP-UL5B-YE3Z-UWCD-DGDU-AB8Y-FJD2-7W97-A63J-RVZA
</div>
</html>
as you can see, the div has a bit too many spaces, back to the point, the thing is I need to select the ID value and the copy it.
My starting point was this question: How to manipulate user selected text using webdriver? then I moved to this: How to move cursor in Selenium Webdriver
I believe I can do it with a javascript executor but i'm a bit lost on how to use it, my idea is to create an element just with the "Host ID: " text and another one just with the RVZA text, but then I realize I can't create an element based only in that text, (can I?) because both elements will be the same element
So if any of you could guide me on the right path i'll appreciate it