I find the solution a bit tricky and I need some help with this. Let's say we have 3 HTML DOM elements, how can we find the closest element that contains all this 3 elements? Is there any efficient way to achieve this?
I am using C# .net and classic System.Windows.Forms webbrowser called webBrowser1.
If the question sounds a bit hard, let me explain. We have the following HTML text:
<body>
<div id="a">
<div id="b">some text</div>
<div id="c">some text</div>
<div id="d">
<div id="e">some text</div>
<div id="f">
<div id="g">some text</div>
</div>
</div>
</div>
</body>
The first element that contains elements B C and E is A
The first element that contains G and E is D
Really hope somebody can help with this. Thank you in advance