I'm trying to set value of form in DotNetBrowser, but to get this form I have to use
var b = browserView.Browser.GetDocument().GetElementsByTagName("span")[1];
because ID's of forms aren't unique. The problem is that returns me
DotNetBrowser.DOM.DOMNode
and to make a usage from example that provides DotNetBrowser link. I need
DotNetBrowser.DOM.DOMInputElement
which I have no idea how to convert into.
The
span
DOM node can be safely casted toDOMElement
:You can also use a
DOMNode.NodeType
property to check the node type and then perform a safe cast: