2
HI GUYS.
I need to get c# the innerHTML of the first SPAN element that has a value with numbers that is inside a div and I I’ve even written a code that’s on the right track, I think. So far this is it.:
HtmlElementCollection Elems;
WebBrowser WebOC = webBrowser;
Elems = WebOC.Document.GetElementsByTagName("div");
foreach (HtmlElement elem in Elems) {
if ((elem.GetAttribute("id") == "MyId")) {
}
}
To do this with Javascript I can with this code below
HTML
<div id="myId" class=""><span>874.005.877-81</span><span class="clipboard-copy"></span></div>
JAVASRIPT
var x = document.getElementById("myId");
var val = x.querySelector("span").innerHTML;
alert(val);
Thank you for any solution to this ;D