开发者

Can a program that controls IE detect if a HTTP 30x code is encountered?

开发者 https://www.devze.com 2022-12-27 17:41 出处:网络
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. (

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 cert开发者_如何学Cain 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?


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

0

精彩评论

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