views:

36

answers:

1

I am trying to control an InternetExplorer.Application via the COM interface, using Perl, Win32::OLE, and information from MSDN. My goal is to get as good an idea as possible about what IE is doing. (Related to this question.)

IE uses events to notify my program when it has finished various stages of processing a certain URL (NavigateComplete2, DownloadComplete DocumentComplete). It can also tell my program about various errors it encounters (NavigateError2). I consider that part of my problem solved well enough.

I would also like to be able to reliably detect if IE is redirected by the server. Primarily, I'm concerned about HTTP 30x status codes. Is there a way to do this, either with COM automation or via another route?

+1  A: 

Hi Hillu.

I use WatiN to bend Internet Explorer to the will of my applications.

I don't think you can use Perl with it. But any way it might help.

Its a nice .NET library with almost 5 years, its devoted to the automation of Internet Explorer, first developed to speed up testing of Web Applications.

Some of its features:

  • Automates all major HTML elements
  • Find elements by multiple attributes
  • Supports AJAX website testing
  • Supports frames (cross domain) and iframes
  • Supports popup dialogs like alert, confirm, login etc..
  • Supports HTML dialogs (modal and modeless)
  • Provides a Page and Control model.
  • Supports creating screenshots of webpages
  • Has a basic (extensible) logging mechanism
  • Easy to integrate with your favorit (unit) test tool
  • Works with Internet Explorer 6, 7, 8 and FireFox 2 and 3

I'm sure if you have a look around its documentation you will find something of use in helping you with your problem, and if not i think this blog post will give you a simple way of checking if IE as turned a server error page.

Hope it helps. Fábio

Fábio Antunes