tee
tee

Reputation: 155

C# control browser

Please suggest how can write c# to control browser to go to url and auto fill in specific element

Upvotes: 1

Views: 762

Answers (2)

alex
alex

Reputation: 1278

Why don't you use WebBrowser Control in C#? Drag the Control from the Toolbar to your Form. Then do webBrowser1.Navigate("http://www.example.com/bla");
fill in the element you want like this: webBrowser1.Document.getElementById("yourID").innerHTML = "some content";

hope this helps,
Alex

Upvotes: 2

Robert Koritnik
Robert Koritnik

Reputation: 105081

Use WatiN project to open browser, go to specific page and do the appropriate. Primarily this is a web testing automation tool, but you could (ab)use it for other things as well.

http://watin.sourceforge.net/

Upvotes: 2

Related Questions