I have the below Html code
<div class='blah'>...<div>
<div class='ct-bottom'>
<button A>A</Button>
<button B>B</Button>
</div>
I am trying to use C# SHDocVw to find the div element and get the children out of it. Here is the C# code
SHDocVw.InternetExplorer IE = new SHDocVw.InternetExplorer();
IE.Navigate(Url_Home);
foreach (HTMLDivElementClass div in IE.Document.GetElementsByClassName("ct-bottom"))
{
if (div.innerHTML !=null )
{
Console.WriteLine(div.children.length); // This does not work !
break;
}
}
Error Message:
'object' does not contain a definition for 'length' and no extension method 'length' accepting a first argument of type 'object' could be found