Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programatically interact with the IE browser to fill in forms and navigate etc

I'd like to use C# to interact with the IE browser.

I have a feeling that shdocvw.dll will be involved, but there are so many classes in there that I don't know where to start, and maybe it's not even necessary to use it.

The goal here is to interact with a website, visiting it's pages and "warming it up," not unlike as described here by Kenneth Scott. The thing is, javascript is getting executed as you interact with a website, so it would be nice just to be able to login / submit forms exactly as you would on the website itself.

Plus it would be nice to be able to create a program that records my actions in IE, and then be able to slightly automate and slightly modify them.

Additionally, it would be nice if it could do all this in the background, without having to display the webpage at all.

I'm not looking for third party solutions, I want to do this myself (with your advice of course.)

Thanks.

like image 976
user420667 Avatar asked Jan 19 '23 02:01

user420667


1 Answers

You said you're not looking for a third party solution, however, we have used WatiN in work with great success for automated UI testing.

It's open source, so if you want to see how they do it, you can.

like image 117
Patrick McDonald Avatar answered Jan 26 '23 17:01

Patrick McDonald