DotNetBrowser 1.8.1 introduces an ability to get the DOM node at the particular location on the page. TheBrowser.NodeAtPoint() method returns aDOMNodeAtPoint object that contains information about DOM node at the location or null when there's no node at this location.

Example

C#

using DotNetBrowser;
using DotNetBrowser.DOM;
using DotNetBrowser.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GetNodeAtPointSample
{
    /// <summary>
    /// This sample demonstrates how to get DOM Node at a specific point on the web page.
    /// </summary>
    class Program
    {
       static void Main(string[] args)
       {
           Browser browser = BrowserFactory.Create();
           browser.SetSize(700, 500);
           browser.FinishLoadingFrameEvent += delegate(object sender, FinishLoadingEventArgs e)
           {
               if (e.IsMainFrame)
               {
                   DOMNodeAtPoint nodeAtPoint = browser.NodeAtPoint(50, 50);
                   Console.WriteLine("nodeAtPoint = " + nodeAtPoint.ToString());
               }
           };
           browser.LoadURL("http://www.teamdev.com");
       }
    }
}

VB.NET

Imports DotNetBrowser
Imports DotNetBrowser.DOM

Module Module1
    ''' <summary>
    ''' This sample demonstrates how to get DOM Node at a specific point on the web page.
    ''' </summary>
    Sub Main()
        Dim browser As Browser = BrowserFactory.Create()
        browser.SetSize(700, 500)
        AddHandler browser.FinishLoadingFrameEvent, sub(sender, e) 
            If e.IsMainFrame Then

                Dim nodeAtPoint As DOMNodeAtPoint = browser.NodeAtPoint(50, 50)
                Console.WriteLine("nodeAtPoint = " + nodeAtPoint.ToString())
            End If
        End sub
        browser.LoadURL("http://www.teamdev.com")
    End Sub
End Module