Serge Vinogradov
Serge Vinogradov

Reputation: 730

C# WebBrowser - How to fill in TextArea DOM?

I don't know how to fill in the text to textarea object on an HTML page.

I tried these:

//1
obj.InnerHtml = "mytext"
//2
obj.Focus();
Sendkeys.SendWait("MyText");
//3
obj.InnerText = "mytext";

But neither of them work. Thanks.

Upvotes: 0

Views: 810

Answers (1)

chemicalNova
chemicalNova

Reputation: 841

If you know the element ID, you can use this:

webBrowserControl.Document.GetElementById("Element_ID_Here").InnerHtml = "TEXT HERE";

Upvotes: 1

Related Questions