vendredi 5 juin 2020

C# WebBrowser get dynamic added elements from DOM

I have simple page: http://jstest.sytes.net/Test1.html and I need to access/get dynamically created elements from DOM via WebBrowser WinForms control

When I try to get it by:

HtmlElementCollection divs = webBrowser1.Document.GetElementsByTagName("div");

it returns only 2 divs ('container', 'inner') but I need get 2 others created by javascript ('class1', 'class2'

Appreciate any help!




Aucun commentaire:

Enregistrer un commentaire