Malartre
Malartre

Reputation: 1511

Can we script and automate a browser, preferably with .Net?

Is it possible to easily automate a browser, preferably with .Net?

I would prefer to automate Google Chrome, or a variant of it, but any browser would be welcome.

This would be used for automating tests or scraping web sites for data.

I was looking at iMacro, but I would like to do it using .Net.

Any other hints/framework would be appreciated.

Upvotes: 2

Views: 2573

Answers (6)

Mohamad Bahmani
Mohamad Bahmani

Reputation: 98

You can use http://seleniumhq.org/ and also i suggest you take a look at: https://www.essentialobjects.com web site and use EO.WebBrowser.dll assembly.

Upvotes: 1

Jim Holmes
Jim Holmes

Reputation: 1690

Automating tests and scraping data are two different tasks. For automation I can heartily +1 the recommendations for WebDriver. I've used it a lot, it's a great tool, and I still do workshops and sessions on it regularly. You might also consider looking at Telerik's Test Studio which does a great job of helping get through the many challenges around automated testing. (Disclaimer: I'm the evangelist for Test Studio...)

Upvotes: 1

aliassce
aliassce

Reputation: 1197

Just try WebBrowser control (internet Explorer based) inside .Net Framework.

Upvotes: 0

Qba-th'Intrepid
Qba-th'Intrepid

Reputation: 31

How about Selenium?

http://seleniumhq.org/download/

They have a C# version.

Upvotes: 3

Sidharth Mudgal
Sidharth Mudgal

Reputation: 4264

Instead of automating browsers, usually httpwebrequests (check this out) are used to fetch web pages with .NET. This will give you the complete response from the server and perform automatic redirection, manage cookies, etc. The only downside is that the page is not rendered. So you cannot actually "see" what the page actually looks like.

Upvotes: 1

s.froehlich
s.froehlich

Reputation: 923

Have a look at the WebDriver project at http://seleniumhq.org/projects. They do also provide bindings for C#

Upvotes: 1

Related Questions