开发者

how do i access and interact with DOM objects from VB.net

开发者 https://www.devze.com 2022-12-14 22:32 出处:网络
say i load a page via WebBrowser.document class, I want 开发者_如何学Cto literally \"click\" elements in the DOM using VB.net programmatically. I dont want to use the classic WebRequest class.

say i load a page via WebBrowser.document class, I want 开发者_如何学Cto literally "click" elements in the DOM using VB.net programmatically. I dont want to use the classic WebRequest class.

how can i do this ?


The HtmlDocument class in the System.Windows.Forms namespace doesn't help?

There might not be representations of every element type in the DOM in the System.Windows.Forms namespace, but each element has a DomElement property which is the reference to the unmanaged COM interface.

You can then cast those to the appropriate interfaces imported from MSHTML to work with the DOM in any way that you choose.

0

精彩评论

暂无评论...
验证码 换一张
取 消