Anyone know how to automate Internet Explorer in .NET?

  • Thread starter Thread starter Kate Gibbs
  • Start date Start date
K

Kate Gibbs

I need to write a simple utility in VB.NET that reads an
Excel file, gets some data from a sheet, then...it needs
to automate internet explorer in a robot manner.

I know that Application Centre Test does something like
this, but it doesn't support viewstate very well, so I
need to write my own application.

What I'm really looking for are some managed classes that
will allow me to drive IE in a phantom way so that I can
see my browser session working as if I were actually
hitting the keyboard myself etc.

Anyone know how to do this?

TIA.
 
Hi Kate,

If your application is a WinForms one, you may host the Web Browser ActiveX
control and automate it though exposed interfaces. VS .NET will create
managed wrappers for the IE Web Browser control and its interfaces for you.
 
Thats great.

I've managed to get the control working in terms of
navigating to the correct URL etc.

It's now time to drive the web page. I'm guessing I can
do this by using the Controls collection - but this is
empty (has a count of 0).

Firstly, is this the correct way to do this?

If not, do you know what alternative methods I should be
using to programatically fill-in text boxes and click on
buttons etc.
-----Original Message-----
Hi Kate,

If your application is a WinForms one, you may host the Web Browser ActiveX
control and automate it though exposed interfaces. VS .NET will create
managed wrappers for the IE Web Browser control and its interfaces for you.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Unit Testing and Integration Environment
http://x-unity.miik.com.ua
Deliver reliable .NET software

Kate Gibbs said:
I need to write a simple utility in VB.NET that reads an
Excel file, gets some data from a sheet, then...it needs
to automate internet explorer in a robot manner.

I know that Application Centre Test does something like
this, but it doesn't support viewstate very well, so I
need to write my own application.

What I'm really looking for are some managed classes that
will allow me to drive IE in a phantom way so that I can
see my browser session working as if I were actually
hitting the keyboard myself etc.

Anyone know how to do this?

TIA.

.
 
Back
Top