开发者

C# control browser

开发者 https://www.devze.com 2023-01-31 09:40 出处:网络
Pl开发者_高级运维ease suggest how can write c# to control browser to go to url and auto fill in specific elementWhy don\'t you use WebBrowser Control in C#? Drag the Control from the Toolbar to your F

Pl开发者_高级运维ease suggest how can write c# to control browser to go to url and auto fill in specific element


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


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/

0

精彩评论

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