DotNetBrowser DOM API provides functionality that can be used for finding HTML elements on the loaded web page by different conditions. The following sample code demonstrates how to find all HTML elements by specified tag name:

List<DOMNode> divs = document.GetElementsByTagName("div");

If you need to find only first HTML element in the document use the following approach:

DOMElement div = document.GetElementById("myId");

In general you can search for HTML elements using different conditions:

DOMElement element = document.GetElementById("myId");
List<DOMNode> elements = document.GetElementsByTagName("div");
List<DOMNode>elements = document.GetElementsByClassName("myClass");
List<DOMNode> elements = document.GetElementsByName("myName");

See the following examples: